nl_tokens: Decompresses into an array of bytes . <p > If <code > len< / code > is zero no bytes are read and <code > 0< / code > is returned . Otherwise this will block until <code > len< / code > bytes have been decompressed the end of the LZMA2 stream is reached or an exception is thrown .
pl_tokens: public int read ( byte [ ] buf , int off , int len ) throws IOException { if ( off < 0 || len < 0 || off + len < 0 || off + len > buf . length ) throw new IndexOutOfBoundsException ( ) ; if ( len == 0 ) return 0 ; if ( in == null ) throw new XZIOException ( "Stream closed" ) ; if ( exception != null ) throw exception ; if ( endReached ) return - 1 ; try { int size = 0 ; while ( len > 0 ) { if ( uncompressedSize == 0 ) { decodeChunkHeader ( ) ; if ( endReached ) return size == 0 ? - 1 : size ; } int copySizeMax = Math . <mask> ( uncompressedSize , len ) ; if ( ! isLZMAChunk ) { lz . copyUncompressed ( in , copySizeMax ) ; } else { lz . setLimit ( copySizeMax ) ; lzma . decode ( ) ; } int copiedSize = lz . flush ( buf , off ) ; off += copiedSize ; len -= copiedSize ; size += copiedSize ; uncompressedSize -= copiedSize ; if ( uncompressedSize == 0 ) if ( ! rc . isFinished ( ) || lz . hasPending ( ) ) throw new CorruptedInputException ( ) ; } return size ; } catch ( IOException e ) { exception = e ; throw e ; } }