mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-09-24 16:05:27 +00:00
lzma works with zip
This commit is contained in:
@@ -201,7 +201,7 @@ internal abstract partial class ZipFilePart
|
||||
await stream
|
||||
.ReadFullyAsync(props, 0, propsSize, cancellationToken)
|
||||
.ConfigureAwait(false);
|
||||
return LzmaStream.Create(
|
||||
return await LzmaStream.CreateAsync(
|
||||
props,
|
||||
stream,
|
||||
Header.CompressedSize > 0 ? Header.CompressedSize - 4 - props.Length : -1,
|
||||
|
||||
@@ -8,6 +8,22 @@ namespace SharpCompress.Compressors.LZMA;
|
||||
|
||||
public partial class LzmaStream
|
||||
{
|
||||
public static ValueTask<LzmaStream> CreateAsync(
|
||||
byte[] properties,
|
||||
Stream inputStream,
|
||||
long inputSize,
|
||||
long outputSize,
|
||||
bool leaveOpen = false
|
||||
) =>
|
||||
CreateAsync(
|
||||
properties,
|
||||
inputStream,
|
||||
inputSize,
|
||||
outputSize,
|
||||
null,
|
||||
properties.Length < 5,
|
||||
leaveOpen
|
||||
);
|
||||
public static async ValueTask<LzmaStream> CreateAsync(
|
||||
byte[] properties,
|
||||
Stream inputStream,
|
||||
|
||||
Reference in New Issue
Block a user