text: public void decompress(DataInput in, int originalLength, int offset, int length, BytesRef bytes) throws IOException {assert offset + length <= originalLength;if (length == 0) {bytes.length = 0;return;}final int compressedLength = in.readVInt();final int paddedLength = compressedLength + 1;compressed = ArrayUtil.grow(compressed, paddedLength);in.readBytes(compressed, 0, compressedLength);compressed[compressedLength] = 0; final Inflater decompressor = new Inflater(true);try {decompressor.setInput(compressed, 0, paddedLength);bytes.offset = bytes.length = 0;bytes.bytes = ArrayUtil.grow(bytes.bytes, originalLength);try {bytes.length = decompressor.inflate(bytes.bytes, bytes.length, originalLength);} catch (DataFormatException e) {throw new IOException(e);}if (!decompressor.finished()) {throw new CorruptIndexException("Invalid decoder state: needsInput=" + decompressor.needsInput()+ ", needsDict=" + decompressor.needsDictionary(), in);}} finally {decompressor.end();}if (bytes.length != originalLength) {throw new CorruptIndexException("Lengths mismatch: " + bytes.length + " != " + originalLength, in);}bytes.offset = offset;bytes.length = length;}