private static void Decode(Stream inputStream, Stream outputStream)
 {
     var decoderInput = new StreamDecoderInput(inputStream);
     var decoderOutput = new StreamDecoderOutput(outputStream);
     var stringTable = new FrameworkDictionaryStringTable(1000);
     var decoder = new LzwDecoder(decoderInput, decoderOutput, stringTable);
     decoder.Decode();
     outputStream.Flush();
     outputStream.Seek(0, SeekOrigin.Begin);
 }
Ejemplo n.º 2
0
        public void SetUp()
        {
            inputStream = CreateInputStreamWithData();
            IDecoderInput input = new StreamDecoderInput(inputStream);

            outputStream = new MemoryStream();
            IDecoderOutput output = new StreamDecoderOutput(outputStream);

            IStringTable stringTable = new FrameworkDictionaryStringTable(100);
            target = new LzwDecoder(input, output, stringTable);
        }