@Override
    public byte[] decompress(byte[] src) throws IOException {
        byte[] result = src;
        byte[] uncompressData = new byte[src.length];
        ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(src);
        LZ4FrameInputStream lz4InputStream = new LZ4FrameInputStream(byteArrayInputStream);
        ByteArrayOutputStream resultOutputStream = new ByteArrayOutputStream(src.length);

        try {
            while (true) {
                int len = lz4InputStream.read(uncompressData, 0, uncompressData.length);
                if (len <= 0) {
                    break;
                }
                resultOutputStream.write(uncompressData, 0, len);
            }
            resultOutputStream.flush();
            resultOutputStream.close();
            result = resultOutputStream.toByteArray();
        } catch (IOException e) {
            throw e;
        } finally {
            try {
                lz4InputStream.close();
                byteArrayInputStream.close();
            } catch (IOException e) {
                log.warn("Failed to close the lz4 compress stream ", e);
            }
        }

        return result;
    }
@Test(expected = IOException.class)
    public void testDecompressWithIOException() throws Exception {
        byte[] compressedData = new byte[] {1, 2, 3};
        Compressor compressor = new Lz4Compressor();
        compressor.decompress(compressedData);
    }