/** * Encodes the set bits in a form suitable for ZIP archives. * * @return byte[] */ public byte[] encode() { byte[] result = new byte[2]; encode(result, 0); return result; }
generalPurposeBit.encode(buf, LFH_GPB_OFFSET);
final boolean encodable = zipEncoding.canEncode(ze.getName()); putShort(versionNeededToExtract(zipMethod, needsZip64Extra), buf, CFH_VERSION_NEEDED_OFFSET); getGeneralPurposeBits(zipMethod, !encodable && fallbackToUTF8).encode(buf, CFH_GPB_OFFSET);