@Override @SuppressWarnings("WeakerAccess") public void readObject(java.io.ObjectInputStream in) throws IOException { min = in.readDouble(); max = in.readDouble(); bitsOfPrecision = in.readByte(); shift = in.readByte(); offset = 0x3ff << bitsOfPrecision; int n = in.readShort(); ByteBuffer buf = ByteBuffer.allocate(n); in.readFully(buf.array(), 0, n); int binCount = bucketIndex(max) + 1; if (binCount > 10000) { throw new IllegalArgumentException( String.format("Excessive number of bins %d during deserialization = %.2g, %.2g", binCount, min, max)); } counts = new long[binCount]; Simple64.decompress(buf.asLongBuffer(), counts); }