diff --git a/components/core/src/clp/streaming_compression/lzma/Compressor.cpp b/components/core/src/clp/streaming_compression/lzma/Compressor.cpp index a9fa0d5a0..34c1a0e2b 100644 --- a/components/core/src/clp/streaming_compression/lzma/Compressor.cpp +++ b/components/core/src/clp/streaming_compression/lzma/Compressor.cpp @@ -26,7 +26,7 @@ auto Compressor::open(FileWriter& file_writer) -> void { m_compressed_stream_block_buffer.size() )) { - throw OperationFailed(ErrorCode_NoMem, __FILENAME__, __LINE__); + throw OperationFailed(ErrorCode_Failure, __FILENAME__, __LINE__); } m_compressed_stream_file_writer = &file_writer; m_uncompressed_stream_pos = 0; @@ -38,7 +38,7 @@ auto Compressor::close() -> void { } if (m_lzma_stream.avail_in() > 0) { - throw OperationFailed(ErrorCode_Corrupt, __FILENAME__, __LINE__); + throw OperationFailed(ErrorCode_Failure, __FILENAME__, __LINE__); } flush_lzma(LZMA_FINISH); @@ -153,7 +153,7 @@ auto Compressor::flush_stream_output_block_buffer() -> void { m_compressed_stream_block_buffer.size() )) { - throw OperationFailed(ErrorCode_NoMem, __FILENAME__, __LINE__); + throw OperationFailed(ErrorCode_Failure, __FILENAME__, __LINE__); } } diff --git a/components/core/tests/test-StreamingCompression.cpp b/components/core/tests/test-StreamingCompression.cpp index 22582cff2..9f0df9306 100644 --- a/components/core/tests/test-StreamingCompression.cpp +++ b/components/core/tests/test-StreamingCompression.cpp @@ -35,7 +35,7 @@ namespace { constexpr string_view cCompressedFilePath{"test_streaming_compressed_file.bin"}; constexpr size_t cBufferSize{128L * 1024 * 1024}; // 128MB constexpr auto cCompressionChunkSizes = std::to_array( - {0, // no-op + {0, cBufferSize / 100, cBufferSize / 50, cBufferSize / 25,