]> git.cworth.org Git - apitrace/blobdiff - trace_snappyfile.hpp
Make sure that the size of the compressed length is constant.
[apitrace] / trace_snappyfile.hpp
index 0cafa98fbd0fabb98da24427b74448b03581c212..601bc12d0154ebab6a8b13b248adc3c8d6b91775 100644 (file)
@@ -6,6 +6,8 @@
 #include <string>
 #include <fstream>
 
+#include <stdint.h>
+
 namespace snappy {
     class File;
 }
@@ -42,8 +44,8 @@ private:
     }
     void flushCache();
     void createCache(size_t size);
-    void writeCompressedLength(size_t num);
-    size_t readCompressedLength();
+    void writeCompressedLength(uint32_t  num);
+    uint32_t readCompressedLength();
 private:
     std::fstream m_stream;
     char *m_cache;