Posted on 2000-04-20
Last Modified: 2010-04-04
I want to know how I can compress an array of byte.  This is basically for files, but I want to do the code myself rather than get a component.

I can guess that a compression function will look for repetitions, or patterns of other kinds, but I don't know what the best approach to this is.

I want just the code that applies to this question - not whole projects, please.

Question by:bogieman_
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 12

Expert Comment

ID: 2736540
The best approach will depend a lot on the sort of data you are compressing.

For instance, data such as black and white images typically have long series of ones and zeros and are very suitable for simple run length encoding or group 3/4 fax compression.

Other data like english text is very suitable to dictionary based compressors like PKZip etc.

Perhaps you can tell us a little more about the sort of information you are compressing.



Expert Comment

ID: 2737756
Another good one for english text is Huffman encoding, especially as the algorithm is really easy.


Accepted Solution

God_Ares earned 200 total points
ID: 2746483
your awnser: ever heard of swag?? it is a porduct of the old day's. I used it a lot...

download the reader and download ARCHIVES.SWG  there are manny examples in there. The conversion from tp7 to delphi x won't be a problem just copy and paste.


LVL 15

Expert Comment

ID: 2860000


Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Suggested Courses
Course of the Month7 days, 1 hour left to enroll

622 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question