Import std.compress.deflate
GzipDecompressor
class
Public Class GzipDecompressor Implements Coder
Gzip's bytes taken in turn, as DeflateDecompressor takes Deflate's, a member after another.
Examples
Local gz = Gzip.Compress("in two halves".Bytes)
Local decompressor = GzipDecompressor()
Local half = gz.Count / 2
Local text = Try decompressor.Add(gz[0..half])
text.AddAll(Try decompressor.Add(gz[half..gz.Count]))
text.AddAll(Try decompressor.Finish())
Expect(String.FromUtf8(text) == "in two halves")std/compress/deflate.fb, line 305
-
A new GzipDecompressor that gives at most
limitbytes. Panics when thelimitis negative. -
Decompresses
data, and gives the bytes it comes to so far. Throws an IOError when the bytes aren't Gzip's, or would come to more than the limit. -
The rest of the bytes, once every one is added, and starts again. Throws an IOError when the stream ended early.
Report an issue with this page or with FutureBlitz on GitHub.