Examples of SetDecoderProperties()


Examples of SevenZip.Compression.LZMA.Decoder.SetDecoderProperties()

      dictionarySize += ((props[1 + i]) & 0xFF) << (i * 8);
   
    if(dictionarySize < 0) throw new InvalidCompressedDataException("Invalid dictionary size");
    if(dictionarySize > MAX_DICTIONARY_SIZE) throw new TooBigDictionaryException();
    Decoder decoder = new Decoder();
    if(!decoder.SetDecoderProperties(props)) throw new InvalidCompressedDataException("Invalid properties");
    decoder.Code(is, cos, maxLength);
    //cos.flush();
    return cos.written();
  }

View Full Code Here

Examples of SevenZip.Compression.LZMA.Decoder.SetDecoderProperties()

  @Override
  public long decompress(InputStream is, OutputStream os, long maxLength, long maxCheckSizeBytes) throws IOException, CompressionOutputSizeException {
    CountedOutputStream cos = new CountedOutputStream(os);
    Decoder decoder = new Decoder();
    decoder.SetDecoderProperties(props);
    decoder.Code(is, cos, maxLength);
    return cos.written();
  }

  @Override
View Full Code Here

Examples of SevenZip.Compression.LZMA.Decoder.SetDecoderProperties()

            ByteArrayOutputStream decompOut = new ByteArrayOutputStream((int) fin.length());
            Decoder d = new Decoder();
            // Read props
            byte[] props = new byte[5];
            compIn.read(props);
            d.SetDecoderProperties(props);
            d.Code(compIn, decompOut, -1);
           
            System.out.printf("Done. Input size %d uncompressed size %d\n", fout.length(), decompOut.size());
           
           
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.