diff --git a/snappy.cc b/snappy.cc index 8a3668c..957d82f 100644 --- a/snappy.cc +++ b/snappy.cc @@ -1151,7 +1151,7 @@ void RawCompress(const char* input, size_t Compress(const char* input, size_t input_length, string* compressed) { // Pre-grow the buffer to the max length of the compressed output - compressed->resize(MaxCompressedLength(input_length)); + STLStringResizeUninitialized(compressed, MaxCompressedLength(input_length)); size_t compressed_length; RawCompress(input, input_length, string_as_array(compressed),