예제 #1
0
 @Override
 public void save(DataOutput out) throws IOException {
   int size = data.size();
   Writer writer = PackedInts.getWriter(out, data.size(), data.getBitsPerValue());
   for (int i = 0; i < size; ++i) {
     long val = data.get(i);
     writer.add(val);
   }
   writer.finish();
 }
예제 #2
0
 @Override
 public long sizeInBytes() {
   return data.getBitsPerValue() * data.size();
 }