@ Override public byte [ ] decompress ( InputStream strm ) { try { ByteArrayOutputStream baos = new ByteArrayOutputStream ( ) ; LZFInputStream in = new LZFInputStream ( strm ) ; byte [ ] buffer = new byte [ 8192 ] ; int len = 0 ; //Decode and copy to output while ( ( len = in . read ( buffer ) ) != - 1 ) { baos . write ( buffer , 0 , len ) ; } return baos . toByteArray ( ) ; } catch ( IOException ioe ) { throw new RuntimeException ( "IOException reading input stream" , ioe ) ; } }
Attempts to decompress an LZF stream