@Override
	public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {

		int formatVersion = in.readInt();
		if (formatVersion != FORMAT_VERSION) {
			throw new IOException("Unsupported DataBuffer serialization");
		}

		boolean compressed = in.readBoolean();

		id = in.readInt();
		dirty = in.readBoolean();
		empty = in.readBoolean();
		int len = in.readInt();

		data = null;

		if (len >= 0) {
			data = new byte[len];
			if (compressed) {
				int compressedLen = in.readInt();
				byte[] compressedData = new byte[compressedLen];
				in.readFully(compressedData);
				inflateData(compressedData, data);
			}
			else {
				in.readFully(data);
			}
		}
	}
Deflate data into compressedData array.  Both arrays must have equal lengths.
@param data
@param compressedData
@return length of compressed data within the compressedData array, or -1 if 
unable to compress.
Ghidra/Framework/DB/src/main/java/db/buffers/DataBuffer.java