New upstream version 0.0~git20210130.47dfef3
Nilesh Patra
3 years ago
78 | 78 | //nEncRead, nDecAdded, err := UnsnapOneFrame(f.Filep, &f.EncBuf, &f.DecBuf, f.Fname) |
79 | 79 | _, _, err = UnsnapOneFrame(f.Reader, &f.EncBuf, &f.DecBuf, f.Fname) |
80 | 80 | if err != nil && err != io.EOF { |
81 | panic(err) | |
81 | return | |
82 | 82 | } |
83 | 83 | |
84 | 84 | n, _ = f.DecBuf.Read(p) |
264 | 264 | // ok=snappy: corrupt input |
265 | 265 | // len(dec) == 0 |
266 | 266 | // |
267 | panic(fmt.Sprintf("could not decode snappy stream: '%s' and len dec=%d and ok=%v\n", fname, len(dec), ok)) | |
267 | err = fmt.Errorf("could not decode snappy stream: '%s' and len dec=%d and error='%v'\n", fname, len(dec), ok) | |
268 | 268 | |
269 | 269 | // get back to caller with what we've got so far |
270 | return nEnc, nDec, nil | |
270 | return nEnc, nDec, err | |
271 | 271 | } |
272 | 272 | // fmt.Printf("ok, b is %#v , %#v\n", ok, dec) |
273 | 273 | |
335 | 335 | } |
336 | 336 | |
337 | 337 | default: |
338 | panic(fmt.Sprintf("unrecognized/unsupported chunk type %#v", chunk_type)) | |
338 | err = fmt.Errorf("unrecognized/unsupported chunk type %#v; on fname='%v'", chunk_type, fname) | |
339 | return nEnc, nDec, err | |
339 | 340 | } |
340 | 341 | |
341 | 342 | } // end for{} |