示例#1
0
        /// <summary>
        /// Creates a new instance of <see cref="Compressor"/>.
        /// </summary>
        /// <param name="decoderAction">The <see cref="IDecoder"/> to use with the decompression action.</param>
        /// <param name="encoderAction">The <see cref="IHuffmanEncoder"/> to use with the compression action.</param>
        /// <param name="huffmanOptions">The <see cref="IInternalHuffmanOptions"/> to configure the huffman options.</param>
        public Compressor(Func <IDecoder> decoderAction, Func <IHuffmanEncoder> encoderAction, IInternalHuffmanOptions huffmanOptions)
        {
            ContractAssertions.IsNotNull(huffmanOptions, nameof(huffmanOptions));

            _decoderAction        = decoderAction;
            _huffmanEncoderAction = encoderAction;
            _huffmanOptions       = huffmanOptions;
        }
示例#2
0
        /// <summary>
        /// Creates a new instance of <see cref="Compressor"/>.
        /// </summary>
        /// <param name="decoderAction">The <see cref="IDecoder"/> to use with the decompression action.</param>
        /// <param name="encoderAction">The <see cref="ILzHuffmanEncoder"/> to use with the compression action.</param>
        /// <param name="matchOptions">The <see cref="IInternalMatchOptions"/> to configure the matching options.</param>
        /// <param name="huffmanOptions">The <see cref="IInternalHuffmanOptions"/> to configure the huffman options.</param>
        public Compressor(Func <IDecoder> decoderAction, Func <ILzHuffmanEncoder> encoderAction, IInternalMatchOptions matchOptions, IInternalHuffmanOptions huffmanOptions)
        {
            ContractAssertions.IsNotNull(decoderAction, nameof(decoderAction));
            ContractAssertions.IsNotNull(encoderAction, nameof(encoderAction));
            ContractAssertions.IsNotNull(matchOptions, nameof(matchOptions));
            ContractAssertions.IsNotNull(huffmanOptions, nameof(huffmanOptions));

            _decoderAction          = decoderAction;
            _lzHuffmanEncoderAction = encoderAction;
            _matchOptions           = matchOptions;
            _huffmanOptions         = huffmanOptions;
        }
示例#3
0
 public void Configure(IInternalMatchOptions matchOptions, IInternalHuffmanOptions huffmanOptions)
 {
     matchOptions.CalculatePricesWith(() => new TaikoLz81PriceCalculator())
     .FindMatches().WithinLimitations(1, 0x102, 2, 0x8000);
 }
示例#4
0
 public void Configure(IInternalMatchOptions matchOptions, IInternalHuffmanOptions huffmanOptions)
 {
     matchOptions.CalculatePricesWith(() => new TaikoLz81PriceCalculator())
     .FindWith((options, limits) => new HistoryMatchFinder(limits, options))
     .WithinLimitations(() => new FindLimitations(1, 0x102, 2, 0x8000));
 }
示例#5
0
 public void Configure(IInternalHuffmanOptions huffmanOptions)
 {
     _encoder.Configure(huffmanOptions);
 }
 public void Configure(IInternalHuffmanOptions huffmanOptions)
 {
 }