mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-25 00:55:11 +01:00
Remove the rac.ReaderContext type
This commit is contained in:
1 parent
65e7b2b6c9
commit
cde91019d9
5 files changed
+47
-69
No files matched your search
@@ -20,15 +20,13 @@ import (
|
||||
"io"
|
||||
|
||||
"github.com/google/wuffs/lib/cgozlib"
|
||||
"github.com/google/wuffs/lib/rac"
|
||||
)
|
||||
|
||||
// MakeDecompressor implements rac.CodecReader.
|
||||
func (r *CodecReader) MakeDecompressor(compressed io.Reader, rctx rac.ReaderContext) (io.Reader, error) {
|
||||
func (r *CodecReader) makeDecompressor(compressed io.Reader, dict []byte) (io.Reader, error) {
|
||||
if r.cachedReader == nil {
|
||||
r.cachedReader = &cgozlib.Reader{}
|
||||
}
|
||||
if err := r.cachedReader.Reset(compressed, rctx.Secondary); err != nil {
|
||||
if err := r.cachedReader.Reset(compressed, dict); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return r.cachedReader, nil
|
||||
|
||||
Reference in new issue
Block a user