@Override
 public BytesInput getBytes() {
   try {
     bitPackingWriter.finish();
   } catch (IOException e) {
     throw new ParquetEncodingException("could not write page", e);
   }
   if (Log.DEBUG) LOG.debug("writing a buffer of size " + out.size());
   return BytesInput.from(out);
 }
 @Override
 public long getAllocatedSize() {
   return out.getCapacity();
 }
 @Override
 public void reset() {
   out.reset();
   bitPackingWriter = getBitPackingWriter(1, out);
 }
 @Override
 public long getBufferedSize() {
   return out.size();
 }