/**
  * lzf 解壓縮
  *
  * @param value
  * @return
  */
 public static byte[] unlzf(byte[] value) {
   byte[] result = new byte[0];
   try {
     result = LZFDecoder.decode(value);
   } catch (Exception ex) {
     ex.printStackTrace();
   }
   return result;
 }
Ejemplo n.º 2
0
 /**
  * Fill the uncompressed bytes buffer by reading the underlying inputStream.
  *
  * @throws IOException
  */
 protected boolean readyBuffer() throws IOException {
   if (bufferPosition < bufferLength) {
     return true;
   }
   if (inputStreamClosed) {
     return false;
   }
   bufferLength = LZFDecoder.decompressChunk(_wrapper, _inputBuffer, _decodedBytes);
   if (bufferLength < 0) {
     return false;
   }
   bufferPosition = 0;
   return (bufferPosition < bufferLength);
 }