Beispiel #1
0
 public void Configure(IInternalMatchOptions matchOptions)
 {
     matchOptions.CalculatePricesWith(() => new Lz77PriceCalculator())
     .FindWith((options, limits) => new HistoryMatchFinder(limits, options))
     .WithinLimitations(() => new FindLimitations(0x1, 0xFF, 1, 0xFF))
     .SkipUnitsAfterMatch(1);
 }
Beispiel #2
0
 public void Configure(IInternalMatchOptions matchOptions)
 {
     matchOptions.CalculatePricesWith(() => new CrilaylaPriceCalculator())
     .FindWith((options, limit) => new HistoryMatchFinder(limit, options))
     .WithinLimitations(() => new FindLimitations(3, -1, 3, 0x2002))
     .AdjustInput(input => input.Skip(SkipSize_).Reverse());
 }
 public void Configure(IInternalMatchOptions matchOptions)
 {
     matchOptions.CalculatePricesWith(() => new TalesOf03PriceCalculator())
     .FindMatches().WithinLimitations(3, 0x11, 1, 0x1000)
     .AndFindMatches().WithinLimitations(4, 0x112)
     .AdjustInput(input => input.Prepend(PreBufferSize_));
 }
 public void Configure(IInternalMatchOptions matchOptions)
 {
     matchOptions.CalculatePricesWith(() => new Lzss01PriceCalculator())
     .FindWith((options, limits) => new HistoryMatchFinder(limits, options))
     .WithinLimitations(() => new FindLimitations(3, 0x12, 1, 0x1000))
     .AdjustInput(input => input.Prepend(PreBufferSize_));
 }
Beispiel #5
0
 public void Configure(IInternalMatchOptions matchOptions)
 {
     matchOptions.CalculatePricesWith(() => new Wp16PriceCalculator())
     .FindMatches().WithinLimitations(4, 0x42, 2, 0xFFE)
     .AdjustInput(input => input.Prepend(PreBufferSize_))
     .HasUnitSize(UnitSize.Short);
 }
 public void Configure(IInternalMatchOptions matchOptions)
 {
     matchOptions.CalculatePricesWith(() => new TaikoLz80PriceCalculator())
     .FindMatches().WithinLimitations(2, 5, 1, 0x10)
     .AndFindMatches().WithinLimitations(3, 0x12, 1, 0x400)
     .AndFindMatches().WithinLimitations(4, 0x83, 1, 0x8000);
 }
Beispiel #7
0
 public void Configure(IInternalMatchOptions matchOptions)
 {
     matchOptions.CalculatePricesWith(() => new PsLzPriceCalculator())
     .FindMatches().WithinLimitations(1, 0xFFFF, 1, 0xFFFF)
     .AndFindRunLength().WithinLimitations(1, 0xFFFF)
     .AndFindConstantRunLength(0).WithinLimitations(1, 0xFFFF);
 }
 public void Configure(IInternalMatchOptions matchOptions)
 {
     matchOptions.CalculatePricesWith(() => new BackwardLz77PriceCalculator())
     .FindWith((options, limits) => new HistoryMatchFinder(limits, options))
     .WithinLimitations(() => new FindLimitations(3, 0x12, 3, 0x1002))
     .AdjustInput(input => input.Reverse());
 }
 public void Configure(IInternalMatchOptions matchOptions)
 {
     matchOptions.CalculatePricesWith(() => new SpikeChunsoftPriceCalculator())
     .FindWith((options, limits) => new HistoryMatchFinder(limits, options))
     .WithinLimitations(() => new FindLimitations(4, -1, 1, 0x1FFF))
     .AndFindWith((options, limits) => new RleMatchFinder(limits, options))
     .WithinLimitations(() => new FindLimitations(4, 0x1003));
 }
Beispiel #10
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="ILzEncoder"/> to use with the compression action.</param>
        /// <param name="matchOptions">The <see cref="IInternalMatchOptions"/> to configure the matching options.</param>
        public Compressor(Func <IDecoder> decoderAction, Func <ILzEncoder> encoderAction, IInternalMatchOptions matchOptions)
        {
            ContractAssertions.IsNotNull(matchOptions, nameof(matchOptions));

            _decoderAction   = decoderAction;
            _lzEncoderAction = encoderAction;
            _matchOptions    = matchOptions;
        }
Beispiel #11
0
 public void Configure(IInternalMatchOptions matchOptions)
 {
     matchOptions.CalculatePricesWith(() => new LzePriceCalculator())
     .FindWith((options, limits) => new HistoryMatchFinder(limits, options))
     .WithinLimitations(() => new FindLimitations(0x3, 0x12, 5, 0x1004))
     .AndFindWith((options, limits) => new HistoryMatchFinder(limits, options))
     .WithinLimitations(() => new FindLimitations(0x2, 0x41, 1, 4));
 }
Beispiel #12
0
 public void Configure(IInternalMatchOptions matchOptions)
 {
     matchOptions.CalculatePricesWith(() => new TaikoLz80PriceCalculator())
     .FindWith((options, limits) => new HistoryMatchFinder(limits, options))
     .WithinLimitations(() => new FindLimitations(2, 5, 1, 0x10))
     .AndFindWith((options, limits) => new HistoryMatchFinder(limits, options))
     .WithinLimitations(() => new FindLimitations(3, 0x12, 1, 0x400))
     .AndFindWith((options, limits) => new HistoryMatchFinder(limits, options))
     .WithinLimitations(() => new FindLimitations(4, 0x83, 1, 0x8000));
 }
Beispiel #13
0
 public void Configure(IInternalMatchOptions matchOptions)
 {
     matchOptions.CalculatePricesWith(() => new PsLzPriceCalculator())
     .FindWith((options, limits) => new HistoryMatchFinder(limits, options))
     .WithinLimitations(() => new FindLimitations(1, 0xFFFF, 1, 0xFFFF))
     .AndFindWith((options, limits) => new StaticValueRleMatchFinder(0, limits, options))
     .WithinLimitations(() => new FindLimitations(1, 0xFFFF))
     .AndFindWith((options, limits) => new RleMatchFinder(limits, options))
     .WithinLimitations(() => new FindLimitations(1, 0xFFFF));
 }
Beispiel #14
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;
        }
Beispiel #15
0
 public void Configure(IInternalMatchOptions matchOptions)
 {
     matchOptions.CalculatePricesWith(() => new LzePriceCalculator())
     .FindMatches().WithinLimitations(3, 0x12, 5, 0x1004)
     .AndFindMatches().WithinLimitations(2, 0x41, 1, 4);
 }
Beispiel #16
0
 public void Configure(IInternalMatchOptions matchOptions, IInternalHuffmanOptions huffmanOptions)
 {
     matchOptions.CalculatePricesWith(() => new TaikoLz81PriceCalculator())
     .FindMatches().WithinLimitations(1, 0x102, 2, 0x8000);
 }
Beispiel #17
0
 public void Configure(IInternalMatchOptions matchOptions)
 {
     matchOptions.CalculatePricesWith(() => new Dr3PriceCalculator())
     .FindMatches().WithinLimitations(2, 0x41, 1, WindowBufferLength_)
     .AdjustInput(config => config.Prepend(PreBufferSize_));
 }
Beispiel #18
0
 public void Configure(IInternalMatchOptions matchOptions)
 {
     matchOptions.CalculatePricesWith(() => new NintendoRlePriceCalculator())
     .FindWith((options, limits) => new RleMatchFinder(limits, options))
     .WithinLimitations(() => new FindLimitations(0x3, 0x82));
 }
Beispiel #19
0
 public void Configure(IInternalMatchOptions matchOptions)
 {
     matchOptions.CalculatePricesWith(() => new Lz4PriceCalculator())
     .FindMatches().WithinLimitations(0x4, 0x100, 1, 0xFFFF);
 }
Beispiel #20
0
 public void Configure(IInternalMatchOptions matchOptions)
 {
     matchOptions.CalculatePricesWith(() => new LzssVlcPriceCalculator())
     .FindWith((options, limits) => new HistoryMatchFinder(limits, options))
     .WithinLimitations(() => new FindLimitations(1, -1));
 }
Beispiel #21
0
 public void Configure(IInternalMatchOptions matchOptions)
 {
     matchOptions.CalculatePricesWith(() => new Lz77PriceCalculator())
     .FindMatches().WithinLimitations(1, 0xFF, 1, 0xFF)
     .SkipUnitsAfterMatch(1);
 }
Beispiel #22
0
 public void Configure(IInternalMatchOptions matchOptions)
 {
     matchOptions.CalculatePricesWith(() => new CrilaylaPriceCalculator())
     .FindMatches().WithinLimitations(3, -1, 3, 0x2002)
     .AdjustInput(input => input.Skip(SkipSize_).Reverse());
 }
 public void Configure(IInternalMatchOptions matchOptions)
 {
     matchOptions.CalculatePricesWith(() => new SpikeChunsoftPriceCalculator())
     .FindMatches().WithinLimitations(4, -1, 1, 0x1FFF)
     .AndFindRunLength().WithinLimitations(4, 0x1003);
 }
Beispiel #24
0
 public void Configure(IInternalMatchOptions matchOptions)
 {
     matchOptions.CalculatePricesWith(() => new Yay0PriceCalculator())
     .FindWith((options, limits) => new HistoryMatchFinder(limits, options))
     .WithinLimitations(() => new FindLimitations(3, 0x111, 1, 0x1000));
 }
Beispiel #25
0
 public void Configure(IInternalMatchOptions matchOptions)
 {
     matchOptions.CalculatePricesWith(() => new LzEncPriceCalculator())
     .FindMatches().WithinLimitations(3, -1, 1, 0xBFFF);
 }
 public void Configure(IInternalMatchOptions matchOptions)
 {
     matchOptions.CalculatePricesWith(() => new BackwardLz77PriceCalculator())
     .FindMatches().WithinLimitations(3, 0x12, 3, 0x1002)
     .AdjustInput(input => input.Reverse());
 }
Beispiel #27
0
 public void Configure(IInternalMatchOptions matchOptions)
 {
     _encoder.Configure(matchOptions);
 }
Beispiel #28
0
 public void Configure(IInternalMatchOptions matchOptions)
 {
     matchOptions.CalculatePricesWith(() => new StingLzPriceCalculator())
     .FindMatches().WithinLimitations(3, 258, 1, 255);
 }
Beispiel #29
0
 public void Configure(IInternalMatchOptions matchOptions)
 {
     matchOptions.CalculatePricesWith(() => new Mio0PriceCalculator())
     .FindMatches().WithinLimitations(3, 0x12, 1, 0x1000);
 }
Beispiel #30
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));
 }