[ABI Break] LZ4 framesize prefix will now be a 32 bit integer. given the recommended length of a small block is 16KiB or ~ 2^16, it doesn't make sense to use 16bit integers

This commit is contained in:
Reece Wilson 2021-07-11 18:56:20 +01:00
parent 95a04e0984
commit be7b080c56
2 changed files with 3 additions and 3 deletions

View File

@ -309,7 +309,7 @@ namespace Aurora::Compression
while (read != input)
{
AuUInt16 frameSize;
AuUInt32 frameSize;
AuUInt32 request = sizeof(frameSize);
if (this->reader_->Read(&frameSize, request) != IO::EStreamError::eErrorNone)

View File

@ -449,7 +449,7 @@ namespace Aurora::Compression
auto read = stream.inPipe(inBuf.get() , 64 * 1024);
if (!read) break;
AuUInt16 bufferedBytes = LZ4_compress_fast_continue(lz4Stream, inBuf.get(), outBuf.get(), read, size, 1);
AuUInt32 bufferedBytes = LZ4_compress_fast_continue(lz4Stream, inBuf.get(), outBuf.get(), read, size, 1);
if (bufferedBytes <= 0)
{
@ -482,7 +482,7 @@ namespace Aurora::Compression
while (true)
{
AuUInt16 frameSize;
AuUInt32 frameSize;
AuUInt32 request = sizeof(frameSize);
auto read = pipe.inPipe(&frameSize, sizeof(frameSize));
if (read != request)