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 150285
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T09:15:58+00:00 2026-05-11T09:15:58+00:00

One of the core steps in file compression like ZIP is to use the

  • 0

One of the core steps in file compression like ZIP is to use the previous decoded text as a reference source. For example, the encoded stream might say ‘the next 219 output characters are the same as the characters from the decoded stream 5161 bytes ago.’ This lets you represent 219 characters with just 3 bytes or so. (There’s more to ZIP than that, like Huffman compression, but I’m just talking about the reference matching.)

My question is what the strategy(ies) for the string matching algorithm is. Even looking at source code from zlib and such don’t seem to give a good description of the compression matching algorithm.

The problem might be stated as: Given a block of text, say 30K of it, and an input string, find the longest reference in the 30K of text which exactly matches the front of the input string.’ The algorithm must be efficient when iterated, ie, the 30K block of text will be updated by deleting some bytes from the front and adding new ones to the rear and a new match performed.

I’m a lot more interested in discussions of the algorithm(s) to do this, not source code or libraries. (zlib has very good source!) I suspect there may be several approaches with different tradeoffs.

  • 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. 2026-05-11T09:15:59+00:00Added an answer on May 11, 2026 at 9:15 am

    You could look at the details of the LZMA Algorithm used by 7-zip. The 7-zip author claims to have improved on the algorithm used by zlib et al.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Imagine 2 modules for an application. One is called core and acts like an
I'd like to create one jar file to execute that is implemented with java
Can any one guide me with the steps to use charts generated by BIRT
I currently have the following in one solution: Core Project (data access, biz logic,
At our company one of the core C++ classes (Database connection pointer) is implemented
I'm developing a REST API at the moment, and one of the core features
I am rewriting one of javascript's core methods: Element.prototype._removeChild = Element.prototype.removeChild; Element.prototype.removeChild = function(){
I am using core data and set up a one to many relationship for
How would one extend the Paginator class in django.core.paginator to work with Google App
I was learning Core Data and previously I have used SQLite in one of

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.