ByteArrayOutputStream byteOutputStream = new ByteArrayOutputStream();
Encoder encoder = new MemcmpEncoder(byteOutputStream);
encoder.writeFloat(1.1f);
InputStream in = new ByteArrayInputStream(byteOutputStream.toByteArray());
Decoder decoder = new MemcmpDecoder(in);
float readFloat = decoder.readFloat();
assertEquals(1.1f, readFloat, 0.0001);
byteOutputStream = new ByteArrayOutputStream();
encoder = new MemcmpEncoder(byteOutputStream);
encoder.writeDouble(1.1d);