Files
fil/docs/snippets/kotlin/api/batch_extract_bytes_sync.md

17 lines
501 B
Markdown
Raw Permalink Normal View History

2026-06-01 23:40:55 +02:00
```kotlin title="Kotlin"
import dev.kreuzberg.*
fun main() {
val config = ExtractionConfig.builder().build()
val items = listOf(
BatchBytesItem("Hello, world!".toByteArray(), "text/plain", null),
BatchBytesItem("# Heading\n\nParagraph text.".toByteArray(), "text/markdown", null),
)
val results = Kreuzberg.batchExtractBytesSync(items, config)
results.forEachIndexed { index, result ->
println("Item $index: ${result.content().length} chars")
}
}
```