public IntegerWriter createIntegerWriter(PositionedOutputStream output, bool signed, bool isDirectV2, StreamFactory writer) { if (isDirectV2) { bool alignedBitpacking = false; if (writer.getEncodingStrategy() == OrcFile.EncodingStrategy.SPEED) { alignedBitpacking = true; } return new RunLengthIntegerWriterV2(output, signed, alignedBitpacking); } else { return new RunLengthIntegerWriter(output, signed); } }