Lyricdev
GitHub

class DeflateReader

pub class DeflateReader<R :: [Reader]> :: [Reader]

Conforms to Reader.

A Reader that decompresses raw DEFLATE blocks read from inner. Bytes after the final block stay in inner where it is read exactly — the reader takes them one at a time once the end is near — so a wrapper can read its trailer.

Its read throws IoError { kind = .InvalidData } with a CompressError inside for input that is not valid DEFLATE.

Methods

pub static fn new(inner: R): DeflateReader<R>
pub fn bytesOut(): int

Returns the number of bytes decoded so far.

pub fn isDone(): bool

Returns whether the final block has been read whole and all its bytes given out.

pub mut fn read(into: Slice<uint8>): int throws [IoError, Cancelled]