1
0
mirror of https://github.com/chylex/Brotli-Builder.git synced 2025-04-24 23:15:42 +02:00

Add MetaBlock.Uncompressed constructor that takes ArraySegment

This commit is contained in:
chylex 2020-03-18 17:22:11 +01:00
parent f9a0ec4e7d
commit aa0cb63f58

View File

@ -25,6 +25,10 @@ namespace BrotliLib.Brotli.Components{
this.uncompressedData = CollectionHelper.Slice(uncompressedData, start, count);
}
public Uncompressed(ArraySegment<byte> uncompressedData) : base(new DataLength(uncompressedData.Count)){
this.uncompressedData = uncompressedData.ToArray();
}
public override void Decompress(BrotliGlobalState state){
state.OutputBytes(uncompressedData);
}