Codebase list golang-github-glycerine-go-unsnap-stream / eb43a2c
New upstream version 0.0~git20210130.47dfef3 Nilesh Patra 3 years ago
1 changed file(s) with 5 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
7878 //nEncRead, nDecAdded, err := UnsnapOneFrame(f.Filep, &f.EncBuf, &f.DecBuf, f.Fname)
7979 _, _, err = UnsnapOneFrame(f.Reader, &f.EncBuf, &f.DecBuf, f.Fname)
8080 if err != nil && err != io.EOF {
81 panic(err)
81 return
8282 }
8383
8484 n, _ = f.DecBuf.Read(p)
264264 // ok=snappy: corrupt input
265265 // len(dec) == 0
266266 //
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)
268268
269269 // get back to caller with what we've got so far
270 return nEnc, nDec, nil
270 return nEnc, nDec, err
271271 }
272272 // fmt.Printf("ok, b is %#v , %#v\n", ok, dec)
273273
335335 }
336336
337337 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
339340 }
340341
341342 } // end for{}