This repository is a kotlin multiplatform library to read and create a tar. It uses kotlinx-io for the I/O part. Really basic support for now.
If you have immutable data that doesn't need to be partially accessed, that's the perfect format! Also a specificity of a tar is that if you add more data to it, you can redownload only the difference as the tar will keep the order.
SystemFileSystem.source(Path("my.tar"))
.buffered()
.tar().use { tar ->
var nextEntry: TarEntry? = null
while (tar.nextEntry.also { nextEntry = it } != null) {
if (nextEntry != null) {
val headerInfo = nextEntry.header
val fileDataSource = tar.currentFile()
}
}
}val folder = "/tmp"
SystemFileSystem.sink(Path("myNew.tar"))
.buffered()
.tar().use { tarSink ->
listOf("file1.txt", "flie2.xml").forEach { fileName ->
val path = Path("$folder/$fileName")
if (SystemFileSystem.exists(path)) {
tarSink.putNextEntry(TarEntry(path, fileName))
tarSink.write(path)
}
}
}- git tag x.x.x
- git push origin x.x.x
- then go to maven to validate the deployment
- then on GitHub create a new release
We are pascap LTD a small startup, if you want to support us don't hesitate to try our app on the play store, we use that library in production with that application.
No llm has been used for that repository.
- based of ktar
- used gnu specification for validation
- also used apache common-compress to have a reference test
- guide to help publish on maven central