index.put(l, writer.getFilePointer());
writer.stream.writeLong(l);
}
writer.close();
CompressionMetadata comp = CompressionMetadata.create(tmp.getAbsolutePath());
List<Pair<Long, Long>> sections = new ArrayList<Pair<Long, Long>>();
for (long l : valuesToCheck)
{
long position = index.get(l);
sections.add(Pair.create(position, position + 8));
}
CompressionMetadata.Chunk[] chunks = comp.getChunksForSections(sections);
// buffer up only relevant parts of file
int size = 0;
for (CompressionMetadata.Chunk c : chunks)
size += (c.length + 4); // 4bytes CRC