mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-19 16:47:28 +01:00
Make the rac codec per-chunk, not per-chunkWriter
This commit is contained in:
1 parent
2f1d6c77c9
commit
fe2b4e236d
4 files changed
+34
-51
No files matched your search
@@ -71,9 +71,8 @@ func Example_indexLocationAtEnd() {
|
||||
buf := &bytes.Buffer{}
|
||||
w := &rac.ChunkWriter{
|
||||
Writer: buf,
|
||||
Codec: rac.CodecZlib,
|
||||
}
|
||||
if err := w.AddChunk(uint64(len(src)), enc, 0, 0); err != nil {
|
||||
if err := w.AddChunk(uint64(len(src)), enc, 0, 0, rac.CodecZlib); err != nil {
|
||||
log.Fatalf("AddChunk: %v", err)
|
||||
}
|
||||
if err := w.Close(); err != nil {
|
||||
@@ -102,7 +101,6 @@ func Example_indexLocationAtStart() {
|
||||
buf := &bytes.Buffer{}
|
||||
w := &rac.ChunkWriter{
|
||||
Writer: buf,
|
||||
Codec: rac.CodecZlib,
|
||||
IndexLocation: rac.IndexLocationAtStart,
|
||||
TempFile: &bytes.Buffer{},
|
||||
}
|
||||
@@ -143,7 +141,7 @@ func Example_indexLocationAtStart() {
|
||||
}
|
||||
encodedChunk := b.Bytes()
|
||||
|
||||
if err := w.AddChunk(uint64(len(chunk)), encodedChunk, dictResource, 0); err != nil {
|
||||
if err := w.AddChunk(uint64(len(chunk)), encodedChunk, dictResource, 0, rac.CodecZlib); err != nil {
|
||||
log.Fatalf("AddChunk: %v", err)
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user