Hi gophers,

Demonstration: https://play.golang.org/p/AY-fVWiOrFd

I am reading raw bytes from a gzip input. I found that it only reads up to 
chunks of 2^15 even though there is more data to be read.

Is that the intended behavior? I expected whatever internal buffering it 
may have to be invisible to the caller. If that's intended, how could I 
have anticipated that? The contract of Reader 
<https://golang.org/pkg/io/#Reader> says "Read conventionally returns what 
is available instead of waiting for more" but it doesn't seem to be the 
case here. I call Read expecting to wait for gzip to do its internal 
processing and make the data available.

Happy to get your input.

Amit

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/1d46775e-123b-43e7-ba27-bc105d03a552o%40googlegroups.com.

Reply via email to