Minor tweak

This commit is contained in:
Joshua Granick
2015-06-27 12:39:04 -07:00
parent b31b27e323
commit a636515cf6

View File

@@ -63,10 +63,8 @@ namespace lime {
SizeT inputBufferSize = data->Length (); SizeT inputBufferSize = data->Length ();
Byte* inputBufferData = data->Data (); Byte* inputBufferData = data->Data ();
Bytes tempBuffer = Bytes (inputBufferSize + inputBufferSize / 5 + (1 << 16)); SizeT outputBufferSize = inputBufferSize + inputBufferSize / 5 + (1 << 16);
Byte* outputBufferData = (Byte *)malloc (outputBufferSize);
SizeT outputBufferSize = tempBuffer.Length ();
Byte* outputBufferData = tempBuffer.Data ();
SizeT propsSize = 100; SizeT propsSize = 100;
Byte* propsData = (Byte *)malloc (propsSize); Byte* propsData = (Byte *)malloc (propsSize);
Int64 uncompressedLength = inputBufferSize; Int64 uncompressedLength = inputBufferSize;
@@ -90,6 +88,7 @@ namespace lime {
WRITE_LE64 (resultData + propsSize, uncompressedLength); WRITE_LE64 (resultData + propsSize, uncompressedLength);
memcpy (resultData + propsSize + 8, outputBufferData, outputBufferSize); memcpy (resultData + propsSize + 8, outputBufferData, outputBufferSize);
free (outputBufferData);
free (propsData); free (propsData);
} }