summaryrefslogtreecommitdiff
path: root/snappy.h
diff options
context:
space:
mode:
authorsnappy.mirrorbot@gmail.com <snappy.mirrorbot@gmail.com@03e5f5b5-db94-4691-08a0-1a8bf15f6143>2012-08-17 13:54:47 +0000
committersnappy.mirrorbot@gmail.com <snappy.mirrorbot@gmail.com@03e5f5b5-db94-4691-08a0-1a8bf15f6143>2012-08-17 13:54:47 +0000
commitb86e81c8b3426a62d8ab3a7674c2506e9e678740 (patch)
tree252121fe5eea11dd857a3781d249d3b3b48fbced /snappy.h
parent2e225ba821b420ae28e1d427075d5589c1e892d9 (diff)
downloadsnappy-b86e81c8b3426a62d8ab3a7674c2506e9e678740.tar.gz
snappy-b86e81c8b3426a62d8ab3a7674c2506e9e678740.tar.bz2
snappy-b86e81c8b3426a62d8ab3a7674c2506e9e678740.zip
Fix public issue 66: Document GetUncompressedLength better, in particular that
it leaves the source in a state that's not appropriate for RawUncompress. R=sanjay git-svn-id: https://snappy.googlecode.com/svn/trunk@67 03e5f5b5-db94-4691-08a0-1a8bf15f6143
Diffstat (limited to 'snappy.h')
-rw-r--r--snappy.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/snappy.h b/snappy.h
index 8c2075f..d15ffbf 100644
--- a/snappy.h
+++ b/snappy.h
@@ -56,6 +56,13 @@ namespace snappy {
// number of bytes written.
size_t Compress(Source* source, Sink* sink);
+ // Find the uncompressed length of the given stream, as given by the header.
+ // Note that the true length could deviate from this; the stream could e.g.
+ // be truncated.
+ //
+ // Also note that this leaves "*source" in a state that is unsuitable for
+ // further operations, such as RawUncompress(). You will need to rewind
+ // or recreate the source yourself before attempting any further calls.
bool GetUncompressedLength(Source* source, uint32* result);
// ------------------------------------------------------------------------