@Test
public void test() throws Exception {

  float value = 7.101f;
  Encoder encoder = new FloatEncoder(TSEncoding.RLE, TSDataType.FLOAT, 3);
  ByteArrayOutputStream baos = new ByteArrayOutputStream();
  encoder.encode(value, baos);
  encoder.flush(baos);
  encoder.encode(value + 2, baos);
  encoder.flush(baos);
  ByteBuffer buffer = ByteBuffer.wrap(baos.toByteArray());
  Decoder decoder1 = new FloatDecoder(TSEncoding.RLE, TSDataType.FLOAT);
  Decoder decoder2 = new FloatDecoder(TSEncoding.RLE, TSDataType.FLOAT);
  float value1_ = decoder1.readFloat(buffer);
  float value2_ = decoder2.readFloat(buffer);
  assertEquals(value, value1_, delta);
  assertEquals(value + 2, value2_, delta);
  logger.debug("{} // {}", value, value1_);
  logger.debug("{} // {}", value + 2, value2_);
}