wakahiu / snappy

Automatically exported from code.google.com/p/snappy
Other
0 stars 0 forks source link

RawUncompress can't be called after GetUncompressedLength on a single Source #66

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Construct a snappy::Source consisting of compressed data.
2. Call GetUncompressedLength on the source.
3. Try to decompress the source with RawUncompress.

What is the expected output? What do you see instead?

I haven't actually run this, but the semantics of source it's impossible that 
this would work, since GetUncompressedLength is required to call Skip if Peak 
only returns a single byte.  I've glanced at the code to confirm that it won't 
work.

This is only a documentation request: in my case I can easily restart the 
source manually, but it's worth mentioning this constraint in the snappy.h 
header file.  The semantics of Source make this impossible to fix, and it 
doesn't seem worth changing the semantics to make it possible.

What version of the product are you using? On what operating system?

git-svn-id: http://snappy.googlecode.com/svn/trunk@66 
03e5f5b5-db94-4691-08a0-1a8bf15f6143

Please provide any additional information below.

Original issue reported on code.google.com by geoffrey...@gmail.com on 5 Aug 2012 at 5:35

GoogleCodeExporter commented 9 years ago
Fixed in r67.

Original comment by se...@google.com on 17 Aug 2012 at 1:55