Github user wohali commented on a diff in the pull request:
https://github.com/apache/couchdb-snappy/pull/9#discussion_r225660319
--- Diff: c_src/snappy_nif.cc ---
@@ -100,6 +94,21 @@ SnappyNifSink::getBin()
}
+void
+SnappyNifSink::EnsureSize(size_t append_length)
+{
+ if((length + append_length) > bin.size) {
+ size_t sz = append_length * 4;
--- End diff --
why not use `sizeof()` here, rather than a fixed 4 bytes, since we target
multiple architectures and people are beating down my door for proper
arm32/arm64/ppc64le support?
---