Avoid calling memset when resizing the buffer.

This buffer will be initialized and then trimmed down to size during the
compression phase.
This commit is contained in:
ckennelly 2016-05-26 14:51:33 -07:00 committed by Alkis Evlogimenos
parent 32d6d7d8a2
commit e788e527d3
1 changed files with 1 additions and 1 deletions

View File

@ -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),