mirror of
https://github.com/chylex/Brotli-Builder.git
synced 2025-05-09 14:34:10 +02:00
Move & rename Brotli compressed components and utils
This commit is contained in:
parent
a2baff135a
commit
efa84b795d
BrotliCalc/Commands
BrotliImpl
Encoders
Transformers
BrotliLib/Brotli
BrotliFileReader.csBrotliGlobalState.cs
Components
Compressed
Data
BlockSwitchCommand.csBlockSwitchTracker.csInsertCopyCommand.csInsertCopyLengthCode.csInsertCopyLengths.cs
Header
MetaBlock.Type.Compressed.csEncode
Utils
UnitTests/Brotli
@ -3,7 +3,7 @@ using BrotliCalc.Commands.Base;
|
||||
using BrotliCalc.Helpers;
|
||||
using BrotliLib.Brotli.Components;
|
||||
using BrotliLib.Brotli.Components.Compressed;
|
||||
using BrotliLib.Brotli.Components.Utils;
|
||||
using BrotliLib.Brotli.Utils;
|
||||
|
||||
namespace BrotliCalc.Commands{
|
||||
class CmdExtractHeaderMeta : CmdAbstractFileTable.Compressed{
|
||||
@ -64,7 +64,7 @@ namespace BrotliCalc.Commands{
|
||||
}
|
||||
}
|
||||
|
||||
private static void ExtractMetadata(List<object> row, MetaBlockCompressionHeader header, MetaBlockCompressionData data){
|
||||
private static void ExtractMetadata(List<object> row, CompressedHeader header, CompressedData data){
|
||||
row.Add(header.DistanceParameters.PostfixBitCount);
|
||||
row.Add(header.DistanceParameters.DirectCodeCount);
|
||||
|
||||
|
@ -2,7 +2,6 @@
|
||||
using System.Collections.Generic;
|
||||
using BrotliImpl.Encoders.Utils;
|
||||
using BrotliLib.Brotli.Components;
|
||||
using BrotliLib.Brotli.Components.Compressed;
|
||||
using BrotliLib.Brotli.Components.Data;
|
||||
using BrotliLib.Brotli.Components.Header;
|
||||
using BrotliLib.Brotli.Encode;
|
||||
|
@ -1,5 +1,4 @@
|
||||
using BrotliLib.Brotli.Components;
|
||||
using BrotliLib.Brotli.Components.Compressed;
|
||||
using BrotliLib.Brotli.Components.Data;
|
||||
using BrotliLib.Brotli.Components.Header;
|
||||
using BrotliLib.Brotli.Encode;
|
||||
|
@ -1,5 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
using BrotliLib.Brotli.Components.Compressed;
|
||||
using BrotliLib.Brotli.Components.Data;
|
||||
using BrotliLib.Brotli.Dictionary.Index;
|
||||
using BrotliLib.Brotli.Encode.Build;
|
||||
|
@ -1,11 +1,10 @@
|
||||
using System.Linq;
|
||||
using BrotliLib.Brotli;
|
||||
using BrotliLib.Brotli;
|
||||
using BrotliLib.Brotli.Components;
|
||||
using BrotliLib.Brotli.Components.Compressed;
|
||||
using BrotliLib.Brotli.Components.Utils;
|
||||
using BrotliLib.Brotli.Components.Data;
|
||||
using BrotliLib.Brotli.Encode;
|
||||
using BrotliLib.Brotli.Encode.Build;
|
||||
using BrotliLib.Brotli.Parameters;
|
||||
using BrotliLib.Brotli.Utils;
|
||||
|
||||
namespace BrotliImpl.Transformers{
|
||||
public class TransformSplitInsertCopyLengths : BrotliTransformerCompressed{
|
||||
|
@ -1,6 +1,5 @@
|
||||
using BrotliLib.Brotli.Components;
|
||||
using BrotliLib.Brotli.Dictionary;
|
||||
using BrotliLib.Brotli.Output;
|
||||
using BrotliLib.Brotli.Parameters;
|
||||
using BrotliLib.Markers;
|
||||
using BrotliLib.Markers.Serialization.Reader;
|
||||
|
@ -2,9 +2,9 @@
|
||||
using System.Collections.Generic;
|
||||
using BrotliLib.Brotli.Components.Data;
|
||||
using BrotliLib.Brotli.Components.Header;
|
||||
using BrotliLib.Brotli.Components.Utils;
|
||||
using BrotliLib.Brotli.Output;
|
||||
using BrotliLib.Brotli.Parameters;
|
||||
using BrotliLib.Brotli.Utils;
|
||||
using BrotliLib.Collections;
|
||||
|
||||
namespace BrotliLib.Brotli{
|
||||
|
@ -4,33 +4,33 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using BrotliLib.Brotli.Components.Data;
|
||||
using BrotliLib.Brotli.Components.Header;
|
||||
using BrotliLib.Brotli.Components.Utils;
|
||||
using BrotliLib.Brotli.Utils;
|
||||
using BrotliLib.Collections;
|
||||
using BrotliLib.Markers.Serialization;
|
||||
using BrotliLib.Markers.Serialization.Reader;
|
||||
using BrotliLib.Markers.Types;
|
||||
using BrotliLib.Serialization;
|
||||
using BrotliLib.Serialization.Writer;
|
||||
using BlockSwitchCommandMap = BrotliLib.Brotli.Components.Utils.CategoryMap<System.Collections.Generic.IReadOnlyList<BrotliLib.Brotli.Components.Compressed.BlockSwitchCommand>>;
|
||||
using BlockSwitchCommandMutableMap = BrotliLib.Brotli.Components.Utils.CategoryMap<System.Collections.Generic.IList<BrotliLib.Brotli.Components.Compressed.BlockSwitchCommand>>;
|
||||
using BlockSwitchCommandMap = BrotliLib.Brotli.Utils.CategoryMap<System.Collections.Generic.IReadOnlyList<BrotliLib.Brotli.Components.Data.BlockSwitchCommand>>;
|
||||
using BlockSwitchCommandMutableMap = BrotliLib.Brotli.Utils.CategoryMap<System.Collections.Generic.IList<BrotliLib.Brotli.Components.Data.BlockSwitchCommand>>;
|
||||
|
||||
namespace BrotliLib.Brotli.Components.Compressed{
|
||||
public sealed class MetaBlockCompressionData{
|
||||
public sealed class CompressedData{
|
||||
public IReadOnlyList<InsertCopyCommand> InsertCopyCommands { get; }
|
||||
public BlockSwitchCommandMap BlockSwitchCommands { get; }
|
||||
|
||||
public MetaBlockCompressionData(IList<InsertCopyCommand> insertCopyCommands, BlockSwitchCommandMap blockSwitchCommands){
|
||||
public CompressedData(IList<InsertCopyCommand> insertCopyCommands, BlockSwitchCommandMap blockSwitchCommands){
|
||||
this.InsertCopyCommands = insertCopyCommands.ToArray();
|
||||
this.BlockSwitchCommands = blockSwitchCommands;
|
||||
}
|
||||
|
||||
public MetaBlockCompressionData(IList<InsertCopyCommand> insertCopyCommands, BlockSwitchCommandMutableMap blockSwitchCommands) :
|
||||
public CompressedData(IList<InsertCopyCommand> insertCopyCommands, BlockSwitchCommandMutableMap blockSwitchCommands) :
|
||||
this(insertCopyCommands, blockSwitchCommands.Select<IReadOnlyList<BlockSwitchCommand>>(list => list.ToArray())){}
|
||||
|
||||
// Object
|
||||
|
||||
public override bool Equals(object obj){
|
||||
return obj is MetaBlockCompressionData contents &&
|
||||
return obj is CompressedData contents &&
|
||||
CollectionHelper.Equal(InsertCopyCommands, contents.InsertCopyCommands) &&
|
||||
Categories.LID.All(category => CollectionHelper.Equal(BlockSwitchCommands[category], contents.BlockSwitchCommands[category]));
|
||||
}
|
||||
@ -42,11 +42,11 @@ namespace BrotliLib.Brotli.Components.Compressed{
|
||||
// Context
|
||||
|
||||
public class Context{
|
||||
public MetaBlockCompressionHeader Header { get; }
|
||||
public CompressedHeader Header { get; }
|
||||
public DataLength DataLength { get; }
|
||||
public BrotliGlobalState State { get; }
|
||||
|
||||
public Context(MetaBlockCompressionHeader header, DataLength dataLength, BrotliGlobalState state){
|
||||
public Context(CompressedHeader header, DataLength dataLength, BrotliGlobalState state){
|
||||
this.Header = header;
|
||||
this.DataLength = dataLength;
|
||||
this.State = state;
|
||||
@ -134,7 +134,7 @@ namespace BrotliLib.Brotli.Components.Compressed{
|
||||
|
||||
// Serialization
|
||||
|
||||
public static readonly BitDeserializer<MetaBlockCompressionData, Context> Deserialize = MarkedBitDeserializer.Wrap<MetaBlockCompressionData, Context>(
|
||||
public static readonly BitDeserializer<CompressedData, Context> Deserialize = MarkedBitDeserializer.Wrap<CompressedData, Context>(
|
||||
(reader, context) => {
|
||||
ReaderDataContext dataContext = new ReaderDataContext(context, reader);
|
||||
List<InsertCopyCommand> icCommands = new List<InsertCopyCommand>();
|
||||
@ -147,11 +147,11 @@ namespace BrotliLib.Brotli.Components.Compressed{
|
||||
|
||||
reader.MarkEndTitle("Command List");
|
||||
|
||||
return new MetaBlockCompressionData(icCommands, dataContext.BlockSwitchCommands);
|
||||
return new CompressedData(icCommands, dataContext.BlockSwitchCommands);
|
||||
}
|
||||
);
|
||||
|
||||
public static readonly BitSerializer<MetaBlockCompressionData, Context> Serialize = (writer, obj, context) => {
|
||||
public static readonly BitSerializer<CompressedData, Context> Serialize = (writer, obj, context) => {
|
||||
DataContext dataContext = new WriterDataContext(context, obj.BlockSwitchCommands, writer);
|
||||
|
||||
foreach(InsertCopyCommand icCommand in obj.InsertCopyCommands){
|
@ -3,8 +3,8 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using BrotliLib.Brotli.Components.Data;
|
||||
using BrotliLib.Brotli.Components.Header;
|
||||
using BrotliLib.Brotli.Components.Utils;
|
||||
using BrotliLib.Brotli.Parameters;
|
||||
using BrotliLib.Brotli.Utils;
|
||||
using BrotliLib.Collections;
|
||||
using BrotliLib.Markers.Serialization;
|
||||
using BrotliLib.Markers.Serialization.Reader;
|
||||
@ -15,7 +15,7 @@ using InsertCopyTree = BrotliLib.Brotli.Components.Header.HuffmanTree<BrotliLib.
|
||||
using DistanceTree = BrotliLib.Brotli.Components.Header.HuffmanTree<BrotliLib.Brotli.Components.Data.DistanceCode>;
|
||||
|
||||
namespace BrotliLib.Brotli.Components.Compressed{
|
||||
public sealed class MetaBlockCompressionHeader{
|
||||
public sealed class CompressedHeader{
|
||||
public CategoryMap<BlockTypeInfo> BlockTypes { get; }
|
||||
public DistanceParameters DistanceParameters { get; }
|
||||
|
||||
@ -27,7 +27,7 @@ namespace BrotliLib.Brotli.Components.Compressed{
|
||||
public IReadOnlyList<InsertCopyTree> InsertCopyTrees { get; }
|
||||
public IReadOnlyList<DistanceTree> DistanceTrees { get; }
|
||||
|
||||
public MetaBlockCompressionHeader(
|
||||
public CompressedHeader(
|
||||
CategoryMap<BlockTypeInfo> blockTypes,
|
||||
DistanceParameters distanceParameters,
|
||||
|
||||
@ -52,7 +52,7 @@ namespace BrotliLib.Brotli.Components.Compressed{
|
||||
// Object
|
||||
|
||||
public override bool Equals(object obj){
|
||||
return obj is MetaBlockCompressionHeader header &&
|
||||
return obj is CompressedHeader header &&
|
||||
BlockTypes.Equals(header.BlockTypes) &&
|
||||
DistanceParameters.Equals(header.DistanceParameters) &&
|
||||
CollectionHelper.Equal(LiteralCtxModes, header.LiteralCtxModes) &&
|
||||
@ -85,7 +85,7 @@ namespace BrotliLib.Brotli.Components.Compressed{
|
||||
return reader.ReadStructureArray(treeCount, HuffmanTree<T>.Deserialize, context, "HTREE" + category.Id());
|
||||
}
|
||||
|
||||
public static readonly BitDeserializer<MetaBlockCompressionHeader, NoContext> Deserialize = MarkedBitDeserializer.Wrap<MetaBlockCompressionHeader, NoContext>(
|
||||
public static readonly BitDeserializer<CompressedHeader, NoContext> Deserialize = MarkedBitDeserializer.Wrap<CompressedHeader, NoContext>(
|
||||
(reader, context) => {
|
||||
var blockTypes = new CategoryMap<BlockTypeInfo>(category => BlockTypeInfo.Deserialize(reader, category));
|
||||
var distanceParameters = DistanceParameters.Deserialize(reader, NoContext.Value);
|
||||
@ -98,11 +98,11 @@ namespace BrotliLib.Brotli.Components.Compressed{
|
||||
var insertCopyTrees = ReadHuffmanTrees(reader, Category.InsertCopy, blockTypes[Category.InsertCopy].TypeCount, InsertCopyLengthCode.TreeContext);
|
||||
var distanceTrees = ReadHuffmanTrees(reader, Category.Distance, distanceCtxMap.TreeCount, DistanceCode.GenerateTreeContext(distanceParameters));
|
||||
|
||||
return new MetaBlockCompressionHeader(blockTypes, distanceParameters, literalCtxModes, literalCtxMap, distanceCtxMap, literalTrees, insertCopyTrees, distanceTrees);
|
||||
return new CompressedHeader(blockTypes, distanceParameters, literalCtxModes, literalCtxMap, distanceCtxMap, literalTrees, insertCopyTrees, distanceTrees);
|
||||
}
|
||||
);
|
||||
|
||||
public static readonly BitSerializer<MetaBlockCompressionHeader, NoContext, BrotliSerializationParameters> Serialize = (writer, obj, context, parameters) => {
|
||||
public static readonly BitSerializer<CompressedHeader, NoContext, BrotliSerializationParameters> Serialize = (writer, obj, context, parameters) => {
|
||||
foreach(BlockTypeInfo blockTypeInfo in obj.BlockTypes.Values){
|
||||
BlockTypeInfo.Serialize(writer, blockTypeInfo, NoContext.Value, parameters);
|
||||
}
|
@ -1,10 +1,10 @@
|
||||
using System;
|
||||
using BrotliLib.Brotli.Components.Data;
|
||||
using BrotliLib.Brotli.Components.Header;
|
||||
using BrotliLib.Brotli.Utils;
|
||||
using BrotliLib.Markers.Serialization;
|
||||
using BrotliLib.Serialization;
|
||||
|
||||
namespace BrotliLib.Brotli.Components.Compressed{
|
||||
namespace BrotliLib.Brotli.Components.Data{
|
||||
public sealed class BlockSwitchCommand{
|
||||
public int Type { get; }
|
||||
public int Length { get; }
|
@ -1,6 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
using BrotliLib.Brotli.Components.Compressed;
|
||||
using BrotliLib.Brotli.Components.Header;
|
||||
using BrotliLib.Brotli.Utils;
|
||||
using BrotliLib.Serialization.Reader;
|
||||
using BrotliLib.Serialization.Writer;
|
||||
|
||||
|
@ -1,15 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using BrotliLib.Brotli.Components.Data;
|
||||
using BrotliLib.Brotli.Components.Utils;
|
||||
using BrotliLib.Brotli.Components.Compressed;
|
||||
using BrotliLib.Brotli.Utils;
|
||||
using BrotliLib.Collections;
|
||||
using BrotliLib.Markers;
|
||||
using BrotliLib.Markers.Serialization;
|
||||
using BrotliLib.Markers.Types;
|
||||
using BrotliLib.Serialization;
|
||||
|
||||
namespace BrotliLib.Brotli.Components.Compressed{
|
||||
namespace BrotliLib.Brotli.Components.Data{
|
||||
public sealed class InsertCopyCommand{
|
||||
public IReadOnlyList<Literal> Literals { get; }
|
||||
|
||||
@ -59,11 +59,11 @@ namespace BrotliLib.Brotli.Components.Compressed{
|
||||
|
||||
// Serialization
|
||||
|
||||
internal static readonly BitDeserializer<InsertCopyCommand, MetaBlockCompressionData.DataContext> Deserialize = MarkedBitDeserializer.Title<InsertCopyCommand, MetaBlockCompressionData.DataContext>(
|
||||
internal static readonly BitDeserializer<InsertCopyCommand, CompressedData.DataContext> Deserialize = MarkedBitDeserializer.Title<InsertCopyCommand, CompressedData.DataContext>(
|
||||
"Insert & Copy Command",
|
||||
|
||||
(reader, context) => {
|
||||
MetaBlockCompressionHeader header = context.Header;
|
||||
CompressedHeader header = context.Header;
|
||||
BrotliGlobalState state = context.State;
|
||||
|
||||
// Insert© lengths
|
||||
@ -138,8 +138,8 @@ namespace BrotliLib.Brotli.Components.Compressed{
|
||||
}
|
||||
);
|
||||
|
||||
internal static readonly BitSerializer<InsertCopyCommand, MetaBlockCompressionData.DataContext> Serialize = (writer, obj, context) => {
|
||||
MetaBlockCompressionHeader header = context.Header;
|
||||
internal static readonly BitSerializer<InsertCopyCommand, CompressedData.DataContext> Serialize = (writer, obj, context) => {
|
||||
CompressedHeader header = context.Header;
|
||||
BrotliGlobalState state = context.State;
|
||||
|
||||
bool endsAfterLiterals = obj.CopyDistance == DistanceInfo.EndsAfterLiterals;
|
@ -1,7 +1,7 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using BrotliLib.Brotli.Components.Header;
|
||||
using BrotliLib.Brotli.Components.Utils;
|
||||
using BrotliLib.Brotli.Utils;
|
||||
using BrotliLib.Numbers;
|
||||
using InsertCopyTree = BrotliLib.Brotli.Components.Header.HuffmanTree<BrotliLib.Brotli.Components.Data.InsertCopyLengthCode>;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using BrotliLib.Brotli.Components.Utils;
|
||||
using BrotliLib.Brotli.Utils;
|
||||
using BrotliLib.Collections;
|
||||
using BrotliLib.Markers.Serialization;
|
||||
using BrotliLib.Numbers;
|
||||
|
@ -1,10 +1,10 @@
|
||||
using BrotliLib.Brotli.Components.Utils;
|
||||
using BrotliLib.Brotli.Components.Data;
|
||||
using BrotliLib.Brotli.Components.Data;
|
||||
using BrotliLib.Numbers;
|
||||
using BlockTypeCodeTree = BrotliLib.Brotli.Components.Header.HuffmanTree<int>;
|
||||
using BlockLengthCodeTree = BrotliLib.Brotli.Components.Header.HuffmanTree<BrotliLib.Brotli.Components.Data.BlockLengthCode>;
|
||||
using System;
|
||||
using BrotliLib.Brotli.Parameters;
|
||||
using BrotliLib.Brotli.Utils;
|
||||
using BrotliLib.Markers.Serialization;
|
||||
using BrotliLib.Serialization;
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using BrotliLib.Brotli.Components.Utils;
|
||||
using BrotliLib.Brotli.Parameters;
|
||||
using BrotliLib.Brotli.Utils;
|
||||
using BrotliLib.Collections;
|
||||
using BrotliLib.Markers.Serialization;
|
||||
using BrotliLib.Numbers;
|
||||
|
@ -13,10 +13,10 @@ namespace BrotliLib.Brotli.Components{
|
||||
/// <code>ISLAST = ?, MLEN > 0, ISUNCOMPRESSED = 0</code>
|
||||
/// </summary>
|
||||
public class Compressed : MetaBlock{
|
||||
public MetaBlockCompressionHeader Header { get; }
|
||||
public MetaBlockCompressionData Data { get; }
|
||||
public CompressedHeader Header { get; }
|
||||
public CompressedData Data { get; }
|
||||
|
||||
public Compressed(bool isLast, DataLength dataLength, MetaBlockCompressionHeader header, MetaBlockCompressionData data) : base(isLast, dataLength){
|
||||
public Compressed(bool isLast, DataLength dataLength, CompressedHeader header, CompressedData data) : base(isLast, dataLength){
|
||||
this.Header = header;
|
||||
this.Data = data;
|
||||
}
|
||||
@ -46,16 +46,16 @@ namespace BrotliLib.Brotli.Components{
|
||||
|
||||
internal new static readonly BitDeserializer<Compressed, Context> Deserialize = MarkedBitDeserializer.Wrap<Compressed, Context>(
|
||||
(reader, context) => {
|
||||
var header = reader.ReadStructure(MetaBlockCompressionHeader.Deserialize, NoContext.Value, "Compression Header");
|
||||
var data = reader.ReadStructure(MetaBlockCompressionData.Deserialize, new MetaBlockCompressionData.Context(header, context.DataLength, context.State), "Compression Data");
|
||||
var header = reader.ReadStructure(CompressedHeader.Deserialize, NoContext.Value, "Compression Header");
|
||||
var data = reader.ReadStructure(CompressedData.Deserialize, new CompressedData.Context(header, context.DataLength, context.State), "Compression Data");
|
||||
|
||||
return new Compressed(context.IsLast, context.DataLength, header, data);
|
||||
}
|
||||
);
|
||||
|
||||
internal new static readonly BitSerializer<Compressed, Context, BrotliSerializationParameters> Serialize = (writer, obj, context, parameters) => {
|
||||
MetaBlockCompressionHeader.Serialize(writer, obj.Header, NoContext.Value, parameters);
|
||||
MetaBlockCompressionData.Serialize(writer, obj.Data, new MetaBlockCompressionData.Context(obj.Header, context.DataLength, context.State));
|
||||
CompressedHeader.Serialize(writer, obj.Header, NoContext.Value, parameters);
|
||||
CompressedData.Serialize(writer, obj.Data, new CompressedData.Context(obj.Header, context.DataLength, context.State));
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,5 @@
|
||||
using System;
|
||||
using BrotliLib.Brotli.Encode.Build;
|
||||
using BrotliLib.Brotli.Output;
|
||||
using BrotliLib.Brotli.Parameters;
|
||||
|
||||
namespace BrotliLib.Brotli.Encode{
|
||||
|
@ -1,10 +1,9 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using BrotliLib.Brotli.Components.Compressed;
|
||||
using BrotliLib.Brotli.Components.Data;
|
||||
using BrotliLib.Brotli.Components.Header;
|
||||
using BrotliLib.Brotli.Components.Utils;
|
||||
using BrotliLib.Brotli.Utils;
|
||||
using BrotliLib.Collections;
|
||||
|
||||
namespace BrotliLib.Brotli.Encode.Build{
|
||||
|
@ -5,10 +5,9 @@ using BrotliLib.Brotli.Components;
|
||||
using BrotliLib.Brotli.Components.Compressed;
|
||||
using BrotliLib.Brotli.Components.Data;
|
||||
using BrotliLib.Brotli.Components.Header;
|
||||
using BrotliLib.Brotli.Components.Utils;
|
||||
using BrotliLib.Brotli.Dictionary.Index;
|
||||
using BrotliLib.Brotli.Output;
|
||||
using BrotliLib.Brotli.Parameters;
|
||||
using BrotliLib.Brotli.Utils;
|
||||
using BrotliLib.Collections;
|
||||
|
||||
namespace BrotliLib.Brotli.Encode.Build{
|
||||
@ -173,7 +172,7 @@ namespace BrotliLib.Brotli.Encode.Build{
|
||||
}
|
||||
}
|
||||
|
||||
var header = new MetaBlockCompressionHeader(
|
||||
var header = new CompressedHeader(
|
||||
blockTypeInfo,
|
||||
DistanceParameters,
|
||||
LiteralContextModes,
|
||||
@ -184,7 +183,7 @@ namespace BrotliLib.Brotli.Encode.Build{
|
||||
ConstructHuffmanTrees(distanceCodeFreq)
|
||||
);
|
||||
|
||||
var data = new MetaBlockCompressionData(icCommandsFinal, bsCommands);
|
||||
var data = new CompressedData(icCommandsFinal, bsCommands);
|
||||
var dataLength = new DataLength(OutputSize);
|
||||
|
||||
return (new MetaBlock.Compressed(isLast: false, dataLength, header, data), state);
|
||||
|
@ -1,7 +1,7 @@
|
||||
using System.Collections.Generic;
|
||||
using BrotliLib.Collections;
|
||||
|
||||
namespace BrotliLib.Brotli.Components.Data{
|
||||
namespace BrotliLib.Brotli.Utils{
|
||||
/// <summary>
|
||||
/// Tracks the current block type, and allows converting between type codes and type values.
|
||||
/// </summary>
|
@ -1,7 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace BrotliLib.Brotli.Components.Utils{
|
||||
namespace BrotliLib.Brotli.Utils{
|
||||
/// <summary>
|
||||
/// Three main types of codes in the insert&copy command whose symbols are represented by Huffman coding trees.
|
||||
/// </summary>
|
@ -2,7 +2,7 @@
|
||||
using System.Collections.Generic;
|
||||
using BrotliLib.Collections;
|
||||
|
||||
namespace BrotliLib.Brotli.Components.Utils{
|
||||
namespace BrotliLib.Brotli.Utils{
|
||||
/// <summary>
|
||||
/// Utility class to map values of type <typeparamref name="T"/> to the categories.
|
||||
/// </summary>
|
@ -1,4 +1,4 @@
|
||||
namespace BrotliLib.Brotli.Components.Utils{
|
||||
namespace BrotliLib.Brotli.Utils{
|
||||
public readonly struct CopyOutputInfo{
|
||||
public int BytesWritten { get; }
|
||||
public bool IsBackReference { get; }
|
@ -1,7 +1,7 @@
|
||||
using System;
|
||||
using BrotliLib.Brotli.Components.Data;
|
||||
|
||||
namespace BrotliLib.Brotli.Components.Utils{
|
||||
namespace BrotliLib.Brotli.Utils{
|
||||
/// <summary>
|
||||
/// Determines how to set <see cref="InsertCopyLengthCode.UseDistanceCodeZero"/> during construction.
|
||||
/// </summary>
|
@ -5,8 +5,8 @@ open System
|
||||
open BrotliLib.Brotli.Components
|
||||
open BrotliLib.Brotli.Components.Data
|
||||
open BrotliLib.Brotli.Components.Header
|
||||
open BrotliLib.Brotli.Components.Utils
|
||||
open BrotliLib.Brotli.Parameters
|
||||
open BrotliLib.Brotli.Utils
|
||||
open BrotliLib.Collections.Huffman
|
||||
open BrotliLib.Numbers
|
||||
open BrotliLib.Serialization
|
||||
|
Loading…
Reference in New Issue
Block a user