Tego zestawienia oraz scenografia całego drugi typ miała miejsce się with the predicted byte. Coding. 7-zip uses a binary arithmetic coder. It first codes one of 4 possible choices: literal, match, rep or short rep A literal code is followed by the 8 bits of the coded byte MSB to LSB order. A match is coded as a length followed by the offset, each using a variable length code which the length of the binary value is transmitted followed by the value. A rep is followed by a length and a 1 or 2 byte code indicating the position a move-to-front queue of the last 3 offsets. A short rep code is complete. Context modeling. Literals are coded using order 1 model plus the low bits of the current position. The position is useful for modeling binary files that have a repeating structure that is a power of 2, for example, array of integers or floating point numbers. order 1 model means that the context for each bit is the 8 bits of the previous byte and the 0 to 7 previously coded bits of the current byte. Match offsets are coded by transmitting the binary length of the offset and then the offset LSB to MSB order. The length of the offset is coded using the match length as context. The context for the 4 low bits is the 0 to 3 previously coded bits. The higher order bits are not compressed. The match literal flags are coded using the low bits of the position as context plus the encoding state. The state is one of 12 values and is updated by the following state table: Next state State Lit Mat Rep SRep Meaning of current state 0 7 9 literal after 2 or more literals 1 7 9 literal after match, literal 2 7 9 literal after rep, literal or after non-literal, short rep, literal 3 7 9 literal after literal, short rep, literal 4 7 9 literal after match 5 7 9 literal after rep or after non-literal, short rep 6 7 9 literal after literal, short rep 7 10 11 match after literal 8 10 11 rep after literal 9 10 11 short rep after literal 10 10 11 match after non-literal 11 10 11 rep or short rep after non-literal LZX. LZX is LZ77 variant used CAB files and compressed help files. It uses a history buffer of up to 2 MB and Huffman coding. To improve compression, it uses shorter codes to code the 3 most recent matches as with LZMA. ROLZ and LZP. The idea of using shorter codes for recent matches can be extended. The compressor for lzrw3 builds a dictionary of pointers into the history buffer as usual to find matching strings, but instead of coding the offset, it codes the index into the table. The decompresser builds identical hash table from the data it has already decompressed, then uses the index to find the match. The length is coded as usual. ROLZ extends this idea further by replacing the large hash table with smaller hash tables selected by a low order context. This reduces the size of the offset, although it can sometimes cause the best match to be missed. ROLZ was implemented WinRK. The extreme case of ROLZ is to use one element per hash table. this case, only a literal or length must be coded. This algorithm is called LZP. It was first described by Bloom 1995. LZP works best with a high order context. Thus, it is often used as a preprocessor to a low or moderate order context model, rather than a fast order 0 model like LZ77. Snappy. snappy is a free, open