{
// header:
byte[] buffer = new byte[TrieHeader.HEADER_LENGTH];
InputUtil.readFully(in, buffer);
// First: let's verify signature, header
TrieHeader header = TrieHeader.read(buffer, 0);
long len = header.getPayloadLength();
if (len > Integer.MAX_VALUE) {
throw new IOException("Too big input file (over 2 gigs)");
}
byte[] payload = new byte[(int) len];
InputUtil.readFully(in, payload);