Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6169475
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T22:51:51+00:00 2026-05-23T22:51:51+00:00

I am currently working on a custom deflate algorithm that should be encapsulated in

  • 0

I am currently working on a custom deflate algorithm that should be encapsulated in a custom class derriving from System.IO.Stream.

I know there is a .Net implementation of a DeflateStream, 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.

I already read some information about deflate und understand that deflate is a combination of LZ77 and Huffman-Encoding and already spent some time for the LZ77 implementation but now do have a few questions about it:

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 MemoryStream which is only able to handle (a set of) bytes.

2) What size would you suggest to use for the sliding window?

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 Huffman codes, but this doesn’t seem to be very efficient. Is there a better way?

Thank you in advance!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T22:51:52+00:00Added an answer on May 23, 2026 at 10:51 pm

    Can’t tell you for the first 2 points, but Huffman coding is basically about generating binary codes for each symbol in your sequence. Code length depends on how frequent the symbol is. The shorter codes are for populars and the longer ones are for unpopulars. The idea is like:

    abaaaaaaaaaabaaaaaaaabaaaaaaaaaaaaaa

    1. Use 1 for ‘a’
    2. Use 01 for ‘b’
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've currently got a BaseController class that inherits from System.Web.Mvc.Controller . On that class
I'm currently working on a plug-in for Eclipse that translates some custom Java code
I'm currently working on a wordpress 2.9.2 plugin (my first) that creates additional custom
I'm currently working on an android application that uses a SimpleCursorAdapter with a custom
I'm currently working on a fairly large project that has been migrated from Ant
I am currently working on a project that is a spinoff (fork) from a
The project I'm currently working on needs to interface with a client system that
I'm currently working on creating a new C# project that needs to interact with
The system I am currently working on requires some role-based security, which is well
I'm currently working on several custom ASPX server controls. Of course these controls do

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.