}
@Override
public BigDecimal deserialize(ByteBuffer bytes) {
if (bytes.remaining() < 4)
throw new InvalidTypeException("Invalid decimal value, expecting at least 4 bytes but got " + bytes.remaining());
bytes = bytes.duplicate();
int scale = bytes.getInt();
byte[] bibytes = new byte[bytes.remaining()];
bytes.get(bibytes);