Note that there are some explanatory texts on larger screens.

plurals
  1. POQuestions about custom Deflate implementation in C#
    primarykey
    data
    text
    <p>I am currently working on a custom deflate algorithm that should be encapsulated in a custom class derriving from <em>System.IO.Stream</em>.</p> <p>I know there <strong>is</strong> a .Net implementation of a <em>DeflateStream</em>, but I as well want to as well completely understand the algorithm as need to implement it because Silverlight what I am using doesn't include that class.</p> <p>I already read some information about deflate und understand that deflate is a combination of <em>LZ77</em> and <em>Huffman-Encoding</em> and already spent some time for the <em>LZ77</em> implementation but now do have a few questions about it:</p> <p>1) The output of LZ77 is a list of triplets (offset, length, successor). It isn't quite efficient to map them as three bytes, isn't it? What would you suggest? I an writing all output to an underlying <em>MemoryStream</em> which is only able to handle (a set of) bytes.</p> <p>2) What size would you suggest to use for the sliding window?</p> <p>3) I do know what Huffman coding is, but how do I apply it here? My problem is that I don't know what size of "chunks" I need to map with it and didn't find any information about this. Do I apply it for each byte? Two bytes? Three? And how do I handle the resulting output (same problem as mentionend in 1))? I thought about using a kind of state machine that continues reading bytes and extracting the <em>Huffman codes</em>, but this doesn't seem to be very efficient. Is there a better way?</p> <p>Thank you in advance!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload