- Sort Score
- Result 10 results
- Languages All
Results 1 - 6 of 6 for NewWriterDict (0.17 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/inflate_test.go
dict := []byte("the lorem fox") ss := []string{ "lorem ipsum izzle fo rizzle", "the quick brown fox jumped over", } deflated := make([]bytes.Buffer, len(ss)) for i, s := range ss { w, _ := NewWriterDict(&deflated[i], DefaultCompression, dict) w.Write([]byte(s)) w.Close() } inflated := make([]bytes.Buffer, len(ss)) f := NewReader(nil) for i := range inflated {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 24 23:23:54 UTC 2023 - 3.3K bytes - Viewed (0) -
src/compress/zlib/writer.go
return err } } if z.compressor == nil { // Initialize deflater unless the Writer is being reused // after a Reset call. z.compressor, err = flate.NewWriterDict(z.w, z.level, z.dict) if err != nil { return err } z.digest = adler32.New() } return nil } // Write writes a compressed form of p to the underlying io.Writer. The
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Feb 27 18:51:27 UTC 2023 - 5.2K 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) -
src/cmd/vendor/golang.org/x/tools/internal/stdlib/manifest.go
{"DefaultCompression", Const, 0}, {"HuffmanOnly", Const, 7}, {"InternalError", Type, 0}, {"NewReader", Func, 0}, {"NewReaderDict", Func, 0}, {"NewWriter", Func, 0}, {"NewWriterDict", Func, 0}, {"NoCompression", Const, 0}, {"ReadError", Type, 0}, {"ReadError.Err", Field, 0}, {"ReadError.Offset", Field, 0}, {"Reader", Type, 0}, {"Resetter", Type, 4},
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 02 02:20:05 UTC 2024 - 534.2K bytes - Viewed (0)