/** * Read needed data (e.g. index) from file. */ protected void initFromFile(ByteSequence bytes, boolean wide) throws IOException { super.initFromFile(bytes, wide); // reads padding match_length = bytes.readInt(); fixed_length = (short)(9 + match_length * 8); length = (short)(fixed_length + padding); match = new int[match_length]; indices = new int[match_length]; targets = new InstructionHandle[match_length]; for(int i=0; i < match_length; i++) { match[i] = bytes.readInt(); indices[i] = bytes.readInt(); } }
/** * Read needed data (e.g. index) from file. */ protected void initFromFile(ByteSequence bytes, boolean wide) throws IOException { super.initFromFile(bytes, wide); int low = bytes.readInt(); int high = bytes.readInt(); match_length = high - low + 1; fixed_length = (short)(13 + match_length * 4); length = (short)(fixed_length + padding); match = new int[match_length]; indices = new int[match_length]; targets = new InstructionHandle[match_length]; for(int i=low; i <= high; i++) match[i - low] = i; for(int i=0; i < match_length; i++) { indices[i] = bytes.readInt(); } }
/** * Read needed data (e.g. index) from file. */ @Override protected void initFromFile( final ByteSequence bytes, final boolean wide ) throws IOException { super.initFromFile(bytes, wide); // reads padding final int _match_length = bytes.readInt(); setMatch_length(_match_length); final short _fixed_length = (short) (9 + _match_length * 8); setFixed_length(_fixed_length); final short _length = (short) (_match_length + super.getPadding()); super.setLength(_length); super.setMatches(new int[_match_length]); super.setIndices(new int[_match_length]); super.setTargets(new InstructionHandle[_match_length]); for (int i = 0; i < _match_length; i++) { super.setMatch(i, bytes.readInt()); super.setIndices(i, bytes.readInt()); } }
/** * Read needed data (e.g. index) from file. */ @Override protected void initFromFile( final ByteSequence bytes, final boolean wide ) throws IOException { super.initFromFile(bytes, wide); final int low = bytes.readInt(); final int high = bytes.readInt(); final int _match_length = high - low + 1; setMatch_length(_match_length); final short _fixed_length = (short) (13 + _match_length * 4); setFixed_length(_fixed_length); super.setLength((short) (_fixed_length + super.getPadding())); super.setMatches(new int[_match_length]); super.setIndices(new int[_match_length]); super.setTargets(new InstructionHandle[_match_length]); for (int i = 0; i < _match_length; i++) { super.setMatch(i, low + i); super.setIndices(i, bytes.readInt()); } }