Java-Bit-Encoding Encode Java primitive types on a certain number of bits in order to reduce memory while keeping access constant. Java-Bit-Encoding does not aim at compressing data as any value in the BitSet will be encoded on the same number of bits.