public LZMAInputStream(InputStream in,int memoryLimit) throws IOException {
  DataInputStream inData=new DataInputStream(in);
  byte propsByte=inData.readByte();
  int dictSize=0;
  for (int i=0; i < 4; ++i)   dictSize|=inData.readUnsignedByte() << (8 * i);
  long uncompSize=0;
  for (int i=0; i < 8; ++i)   uncompSize|=(long)inData.readUnsignedByte() << (8 * i);
  int memoryNeeded=getMemoryUsage(dictSize,propsByte);
  if (memoryLimit != -1 && memoryNeeded > memoryLimit)   throw new MemoryLimitException(memoryNeeded,memoryLimit);
  initialize(in,uncompSize,propsByte,dictSize,null);
}

public LZMAInputStream ( InputStream in , int memoryLimit ) throws IOException { DataInputStream inData = new DataInputStream ( in ) ; byte propsByte = inData . readByte ( ) ; int dictSize = 0 ; for ( int i = 0 ; i < 4 ; ++ i ) dictSize |= inData . readUnsignedByte ( ) << ( 8 * i ) ; long uncompSize = 0 ; for ( int i = 0 ; i < 8 ; ++ i ) uncompSize |= ( long ) inData . readUnsignedByte ( ) << ( 8 * i ) ; int memoryNeeded = getMemoryUsage ( dictSize , propsByte ) ; if ( memoryLimit != - 1 && memoryNeeded > memoryLimit ) throw new MemoryLimitException ( memoryNeeded , memoryLimit ) ; initialize ( in , uncompSize , propsByte , dictSize , null ) ; }
creates a new . lzma file format decompressor with an optional memory usage limit .
