- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for NewWriterDict (0.18 sec)
-
src/compress/flate/deflate.go
} return &dw, nil } // NewWriterDict is like [NewWriter] but initializes the new // [Writer] with a preset dictionary. The returned [Writer] behaves // as if the dictionary had been written to it without producing // any compressed output. The compressed data written to w // can only be decompressed by a [Reader] initialized with the // same dictionary. func NewWriterDict(w io.Writer, level int, dict []byte) (*Writer, error) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Apr 26 13:32:40 UTC 2024 - 20.3K bytes - Viewed (0) -
src/compress/flate/deflate_test.go
if err != nil { t.Fatalf("NewWriter: %v", err) } w.Write([]byte(dict)) w.Flush() b.Reset() w.Write([]byte(text)) w.Close() var b1 bytes.Buffer w, _ = NewWriterDict(&b1, 5, []byte(dict)) w.Write([]byte(text)) w.Close() if !bytes.Equal(b1.Bytes(), b.Bytes()) { t.Fatalf("writer wrote %q want %q", b1.Bytes(), b.Bytes()) } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jun 14 00:03:57 UTC 2023 - 25.6K bytes - Viewed (0) -
src/compress/flate/inflate.go
// with a preset dictionary. The returned [Reader] behaves as if // the uncompressed data stream started with the given dictionary, // which has already been read. NewReaderDict is typically used // to read data compressed by NewWriterDict. // // The ReadCloser returned by NewReaderDict also implements [Resetter]. func NewReaderDict(r io.Reader, dict []byte) io.ReadCloser { fixedHuffmanDecoderInit() var f decompressor f.makeReader(r)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Oct 13 23:20:03 UTC 2023 - 20.4K bytes - Viewed (0)