You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The repair action with mlar uses brotli::BrotliDecompressStream in Read impl for CompressionLayerFailSafeReader. While needing more input (brotli::BrotliResult::NeedsMoreInput) brotli can return an output_offset of 0 which is considered as there is no more bytes to read in the current implementation of MLA (compress layer, notably the read()). This is problematic as it can cut some archives before their end.
One workaround is to read again (could be multiple times) but it's only a workaround.
Two possible solutions could be:
to check that brotli decompressed nothing with other returned values such as available_out or written as it needs more input, so we continue reading ;
The
repair
action withmlar
usesbrotli::BrotliDecompressStream
inRead
impl forCompressionLayerFailSafeReader
. While needing more input (brotli::BrotliResult::NeedsMoreInput
) brotli can return anoutput_offset
of 0 which is considered as there is no more bytes to read in the current implementation of MLA (compress layer, notably theread()
). This is problematic as it can cut some archives before their end.One workaround is to read again (could be multiple times) but it's only a workaround.
Two possible solutions could be:
available_out
orwritten
as it needs more input, so we continue reading ;Read
(https://doc.rust-lang.org/nightly/std/io/trait.Read.html#required-methods) .The text was updated successfully, but these errors were encountered: