Import std.compress.tar
Tar
struct
Public Struct Tar
What makes and reads tar archives, in its Static Methods.
Examples
Local writer = TarWriter()
writer.AddFolder("docs")
writer.Add("docs/readme.txt", "Read me.".Bytes)
Local tar = Try Tar.Read(Gzip.Compress(writer.Finish()))
Expect(tar.Count == 2)
Expect(tar.Find("docs/readme.txt")?.Size == 8)
Local readme = Try tar.Read("docs/readme.txt")
Expect(readme == "Read me.".Bytes)-
A reader of the tar in
data, or in thedatadecompressed when it starts as Gzip's, Zstd's, XZ's, or LZ4's does, which it copies, or an IOError when it isn't a tar, or its compression is broken. A decompressed tar holds no more bytes than an array does.
Report an issue with this page or with FutureBlitz on GitHub.