473,506 Members | 17,000 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Program for compression

b
I have the idea, but I do not know how to program something like this:

Create sorted list with numbers
1
11
111
1111
....

2
22
222
2222
....

to
F
FF
FFF

1
2
3
4
5
6
7
8
9
a
b
c
d
e
f
11
22
33
44
....
EEEEEEEEEEEEEEEE <---16 x E
FFFFFFFFFFFFFFFF <---16 x F

sorted list would look like this:
1
2
3
....
Read first n hex digits of some test file (%H) (n is the biggest
number , 16 if possible)
compare it with the list.

If %H matches number on list, great. Else:
Find first bigger number (%B) than %H.
%S = one number up on list, smaller than %H, unless maching number has
index(0),
and it is first on list.

Find %B - %H = %BR
Find %H - %S = %SR
If %H matches number on list, use that number. Else:
If %BR > %SR , use bigger number, %B. Otherwise use %S.
If they are the same use, %BR?

Write in new file %B or %S as number of digits: If %B or %S is FFFFFF,
then write it as
5F (5 times F). Write length of %BR or %SR, with two hex
numbers. Then write %BR or %SR. Next n digits.

In the begining there should be something like algorithm version.
there should be some some crc checking.

Is there someone who does?
Jul 19 '05 #1
1 1786
b wrote:
I have the idea, but I do not know how to program something like this:


I don't see a C, C++, or Delphi issue in your post. Did you post to the
wrong group by mistake (three times)?

Please find a group where your message is topical. You might also want
to re-write it a little more clearly. I could not make heads or tails of it.

-Kevin
--
My email address is valid, but changes periodically.
To contact me please use the address from a recent posting.

Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
409
by: Jim Hubbard | last post by:
I went to the compression newsgroups, but all I saw was spam. So, I thought I'd post his question here to get the best info I could from other programmers. Which compression algorithm offers...
1
12277
by: Maurice Mertens | last post by:
Hello, I'm having troubles with saving a tiff-file with a certain compression and colordepth. This is the code I use: ----------------------------------------------------------------------...
1
1472
by: joe | last post by:
Hi does anyone know if there is anycode out there to convert a stream such as a network connection from a compression library to an encryption library. or if there is a compresion lib with...
8
2456
by: Anurag | last post by:
Hi, I am told that Oracle has this "data compression" feature that allows you to store online data ina compressed format. This is different from archived data - you compress only that data which...
2
30075
by: deko | last post by:
Is it best practice to set Unicode Compression to "No" for memo fields in a table? What about text fields? According to the VB help entry: "Data in a Memo field is not compressed unless it...
1
10719
by: khaleel.alyasini | last post by:
Hello sirs & madams, I'm currently working on DCT compression algorithm as my project. My knowledge on C++ and DSP is rather weak/moderate. I was wondering if any could help me and teach me the...
20
2898
by: chance | last post by:
Hello, I want to add compression to a memory stream and save it in an Oracle database. This is the code I have so far: //save the Word document to a binary field, MemoryStream dataStream = new...
21
5977
by: =?Utf-8?B?VkJB?= | last post by:
I compressed a file with GZipStream class and is larger than the original file.... how can this be?, the original file is 737 KB and the "compressed" file is 1.1 MB. Did i miss something or is...
3
9220
by: sophia | last post by:
Dear all, the following is the file compression program ,using elimination of spaces, which I saw in a book #include<stdio.h> #include<stdlib.h> int main(int argc,char * argv) {
3
7501
by: GiJeet | last post by:
Hello, we have an app that scans documents into TIFF format and we need to transfer them over the internet. If anyone knows of a SDK we can use that can compress TIFFs on the fly or even if it can...
0
7218
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7307
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7370
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
5035
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4701
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3188
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3177
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
755
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
409
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.