algorithm - DEFLATE Decoding -
algorithm - DEFLATE Decoding -
i reading deflate method encoding/decoding data. understand process composed of 2 parts:
i. replace duplicate info (within specified window) reference previous identical piece.
ii. utilize huffman coding cut down size of commonly occurring symbols.
i have question regards (i). deflate uses lz77 which, based on size window, searches through info and, if finds duplicate information, replaces "pointer". makes perfect sense.
however, when decoding using lz77 how deflate recognize pointer? (pointers length-distance pairs; how can discern if it's pointer or number nowadays in initial data?)
reference: http://en.wikipedia.org/wiki/deflate#duplicate_string_elimination
it's recommended read deflate rfc 1951 specification, much more precise, , reply such questions.
what you'll see in => 3.2.5. compressed blocks (length , distance codes)
"the literal , length alphabets merged single alphabet"
which means that, retrieving next symbol, know if literal (0..255), or match length (257..285), or end of block (256). in case of match length, reference (offset) must decoded too. offset encoded using separate tree.
algorithm compression zip deflate
Comments
Post a Comment