public static void decompress(InputStream src, OutputStream dst) {
        int key = 1;
        byte[] byteKey = new byte[1];
        byte[] byteValue = new byte[1];
        Map<Integer, byte[]> dictionary = new TreeMap<>();

        try {
            // While the end of the file src not reached, read byte.
            while (src.read(byteKey) != -1) {
                // Decompress the stream if the dictionary size exceeds 127 and
                // construct a new dictionary
                if (dictionary.size() == Byte.MAX_VALUE) {
                    decompressStream(dictionary, dst);
                    dictionary.clear();
                    key = 1;
                }
    
                // Get the key
                int result = Util.byteToInt(byteKey[0]);
                
                // Cet the associated value and put it in the dictionary.
                src.read(byteValue);
                if (result == 0) {
                    dictionary.put(key, byteValue.clone());
                    key++;   
                } else if (result > 0) {
                    byte[] val = dictionary.get(result);
                    byte[] buf = Util.mergeBytes(val, byteValue.clone());
                    dictionary.put(key, buf.clone());
                    key++;
                }
            }
            decompressStream(dictionary, dst);
            dst.close();
        } catch (IOException e) {
            System.err.println("An error happened while decompressing.");
        }
    }