Text Compression Routine

Discuss popular GCS tools like ZZT, Megazeux and Adventure Game Studio, as well as programming and other topics related to game design.
Post Reply
User avatar
tienkhoanguyen
PSEUDOCODER
Posts: 2670
Joined: Fri Sep 05, 2014 9:43 am
Location: Texas

Text Compression Routine

Post by tienkhoanguyen »

hehe - Well, you know I love Tacos!hehe Unfortunately, I can't eat any right now because I am on welfare haha.

Anyways, here is a text compression program I am rolling out. It is the ultimate for me in particular anyways because I have been able to compress up to 98% efficiency in 1 case. The files was over 5000 bytes and too hours to compress, and it was worth it to see.

Disclaimer: This program is new so keep your original files if you use it for compression. It has been fixed so far however you never know. I didn't catch the trailing Y until just yesterday.

It is a fully working DEMO so enjoy. It might not contain all the fancy and robust features as my beloved WinRAR 3.93 however it is mine and free.

http://www.mediafire.com/download/ktkbb ... txtcmp.rar
God, Jesus Christ, is number one!hehe
Jesus Christ!hehe
Bless Jesus Christ!
Then please bless my mom.
Honour to my mom Huong Thi Vu
Honour to my dad Thuy Binh Nguyen
Love to cousin Carl Anh Cuong Cao Vu
Thank you Jesus Christ.
User avatar
tienkhoanguyen
PSEUDOCODER
Posts: 2670
Joined: Fri Sep 05, 2014 9:43 am
Location: Texas

Major update so it works with other files too...

Post by tienkhoanguyen »

May 15, 2015 Friday - just released after midnight sometimes.

JCcompt3 is a compression program based on RLE. It is an extremely simplified version of RLE so the compression varies greatly from close to 90+% efficient to a horrible double the size of the original file.

It gives a brief greetings to www.classicdosgames.com

However if you are not on there - you are important too!



SOURCE (written in Borland Turbo C 2.01 and Borland Turbo Assembler 4.1)
http://www.mediafire.com/view/ql7qse7ud ... jccompt3.c

RUN FILE
http://www.mediafire.com/download/spzj8 ... COMPT3.EXE



Note: This version is more flexible. It should be able to handle any file types.


-Tien Khoa Nguyen

P.S. In previous versions, the images would not show right. However that has been fixed for all the tested files so far.
God, Jesus Christ, is number one!hehe
Jesus Christ!hehe
Bless Jesus Christ!
Then please bless my mom.
Honour to my mom Huong Thi Vu
Honour to my dad Thuy Binh Nguyen
Love to cousin Carl Anh Cuong Cao Vu
Thank you Jesus Christ.
User avatar
tienkhoanguyen
PSEUDOCODER
Posts: 2670
Joined: Fri Sep 05, 2014 9:43 am
Location: Texas

DOSgames website and others added to credits screen

Post by tienkhoanguyen »

Jesus!hehe

In this edition, DOSgames and other websites have been added for reference.

You just have to look through the pages and hopefully you see your website.

If you feel I have left you out and would like to be included please write me.

Thank you!!

Once again all credits go for this version.

http://www.mediafire.com/download/wf9ik ... COMPT3.EXE

http://www.mediafire.com/view/o8mg4gdjo ... jccompt3.c

To Jesus Christ - the speed has been increased somewhat#!!
God, Jesus Christ, is number one!hehe
Jesus Christ!hehe
Bless Jesus Christ!
Then please bless my mom.
Honour to my mom Huong Thi Vu
Honour to my dad Thuy Binh Nguyen
Love to cousin Carl Anh Cuong Cao Vu
Thank you Jesus Christ.
User avatar
tienkhoanguyen
PSEUDOCODER
Posts: 2670
Joined: Fri Sep 05, 2014 9:43 am
Location: Texas

God, Jesus Christ, is number one!hehe

Post by tienkhoanguyen »

Jesus Christ!hehe

Here is proof it has compress a bitmap down to 5% or less - THANK GOD!
http://www.mediafire.com/download/5fgu7 ... o/COMPRESS

If you take the above "COMPRESS" and put it in JCcompt3 version 2.

Then you (U)ncompress it.

It produces the original file.

However the name needs to be changed from UNCOMP to UNCOMP.bmp

Then you can view it in your bitmap viewer

Thank you Jesus Christ!
God, Jesus Christ, is number one!hehe
Jesus Christ!hehe
Bless Jesus Christ!
Then please bless my mom.
Honour to my mom Huong Thi Vu
Honour to my dad Thuy Binh Nguyen
Love to cousin Carl Anh Cuong Cao Vu
Thank you Jesus Christ.
User avatar
tienkhoanguyen
PSEUDOCODER
Posts: 2670
Joined: Fri Sep 05, 2014 9:43 am
Location: Texas

God, Jesus Christ, is number one!hehe

Post by tienkhoanguyen »

Jesus Christ!hehe

This is the fixed version (hopefully hehe).

It has two compression method.

The first is that it will try "simple RLE (Run-Length-Encoding)".

If the resulting output is not smaller it simply stores the original away.

So at max it will only be 3 bytes greater than the original.
http://www.mediafire.com/download/3ey53 ... cmp3-3.zip

Thank you God for sending your son Jesus down to give me insight!

Through "Divine Intervention" from Heaven from God I made this!!!!!
God, Jesus Christ, is number one!hehe
Jesus Christ!hehe
Bless Jesus Christ!
Then please bless my mom.
Honour to my mom Huong Thi Vu
Honour to my dad Thuy Binh Nguyen
Love to cousin Carl Anh Cuong Cao Vu
Thank you Jesus Christ.
User avatar
tienkhoanguyen
PSEUDOCODER
Posts: 2670
Joined: Fri Sep 05, 2014 9:43 am
Location: Texas

God, Jesus Christ, is number one!hehe

Post by tienkhoanguyen »

Jesus Christ!hehe

This version of JCcompt3 - version 2 (d) now accepts commandline instructions. It is flexible enough that someone without any knowledge of programming can use. It works for both DOS and 32-bit versions of XP. XP is noticeably faster in modern machines.

To use, type in the commands in the following guidelines on the DOS prompt:

JCcmp32d u
u stands for uncompress
the default input file is COMPRESS without any extension
the default output file is UNCOMP without any extension

JCcmp32d c
c stands for compress
the default input file is LOADFILE without any extension
the default output file is COMPRESS without any extension

JCcmp32d c BITMAP.BMP FILE1.CMP
BITMAP.BMP can be any bitmap file to compress
FILE1.CMP is where you want to store the compressed version
(you could compress many files; just replace BITMAP.BMP with FILE.JPG, etc.)
[the output file can be any valid DOS filename]


Here are your freeware download links:

http://www.mediafire.com/download/z17eh ... h/COMPRESS

http://www.mediafire.com/view/2nxzv1d51 ... jccmp32d.c

http://www.mediafire.com/download/9qlmg ... CMP32D.EXE

http://www.mediafire.com/download/gx1ox ... CMP32D.OBJ

http://www.mediafire.com/view/8h6i8t73y ... jccmp32e.c

http://www.mediafire.com/view/4vloofs84 ... OOLEST.BMP

http://www.mediafire.com/download/lmqaj ... 06x/UNCOMP

[main files have been updated June 9, 2015 Tuesday]


P.S.
Thank you God for another bless day with my real mom Huong Thi Vu!
Blessings and honours to my real mom.
Honours to my real dad Nguyen Binh Thuy.
God, Jesus Christ, is number one!hehe
Jesus Christ!hehe
Bless Jesus Christ!
Then please bless my mom.
Honour to my mom Huong Thi Vu
Honour to my dad Thuy Binh Nguyen
Love to cousin Carl Anh Cuong Cao Vu
Thank you Jesus Christ.
User avatar
tienkhoanguyen
PSEUDOCODER
Posts: 2670
Joined: Fri Sep 05, 2014 9:43 am
Location: Texas

God, Jesus Christ, is number one!hehe

Post by tienkhoanguyen »

Jesus Christ!hehe

Please note that above post from today refers also to XP (specifically 32-bit versions of XP); There is no guarantee other versions of XP will work.

To use the above compression program in XP, you would run it in the command prompt in XP. You know, the black screen with plain text hehe

Anyways, on a modern machine you would have at least 1 gigahertz of computing power. This is 200 times faster than DOS running at native 5 megahertz. So the compression will most likely be extremely fast on most small files.

Thank you Jesus!
God, Jesus Christ, is number one!hehe
Jesus Christ!hehe
Bless Jesus Christ!
Then please bless my mom.
Honour to my mom Huong Thi Vu
Honour to my dad Thuy Binh Nguyen
Love to cousin Carl Anh Cuong Cao Vu
Thank you Jesus Christ.
User avatar
tienkhoanguyen
PSEUDOCODER
Posts: 2670
Joined: Fri Sep 05, 2014 9:43 am
Location: Texas

JCcompt3 - version 2 (Edition J)

Post by tienkhoanguyen »

JCcompt3 - version 2 (j):

In this edition, the compression and decompression routine has been tested and will NOT work with XP (32-bit) if it uses longer lengths than 8 characters for the filenames. Also you should avoid using any numbers as your filenames to compress since it ends up replacing the original and messing it up.

*
The asterisk is a hidden function that batch compresses all the files in directory

-
The minus is also NOT documented and will decompress all the files.
However for it to work you need the FILELIST.CMP generated by the asterisk.
You also need all the numbers generated by the asterisk.

Remember DOS is slow so it may take quite some time for many files.

I max out DOSBox 0.74 at about 2.5 ghz and it takes about a minute.
This is for over 200 files.

http://www.mediafire.com/download/85m6x ... CMP32J.OBJ
http://www.mediafire.com/view/8ebgeqoeh ... JCCMP32J.C
http://www.mediafire.com/download/aeyn1 ... g/JCCMP32J
http://www.mediafire.com/download/py7h1 ... CMP32J.EXE

Thank you to Health and Human Services Commission of Texas and Supplemental Security Income. Without you I would be homeless.

Thank you to Jesus of course for my talents to program in my leisure.

I would like to think I am good hehe
God, Jesus Christ, is number one!hehe
Jesus Christ!hehe
Bless Jesus Christ!
Then please bless my mom.
Honour to my mom Huong Thi Vu
Honour to my dad Thuy Binh Nguyen
Love to cousin Carl Anh Cuong Cao Vu
Thank you Jesus Christ.
User avatar
tienkhoanguyen
PSEUDOCODER
Posts: 2670
Joined: Fri Sep 05, 2014 9:43 am
Location: Texas

God, Jesus Christ, is number one!hehe

Post by tienkhoanguyen »

Jesus Christ!hehe

I just tested the above link in pure what seems to be pure DOS and it seems to NOT work right. So I'm sorry for that. I know what the problem is now. I will see to it an update is made. In the mean time you could use the regular version that processes a single file at a time.

Once again, I'm sorry - I've been working so hard on producing DOSBox 0.74 versions that I neglected MS-DOS 6.22 itself. At least I didn't test it on DOS so I didn't know. Hope you will forgive me! Thanks.
God, Jesus Christ, is number one!hehe
Jesus Christ!hehe
Bless Jesus Christ!
Then please bless my mom.
Honour to my mom Huong Thi Vu
Honour to my dad Thuy Binh Nguyen
Love to cousin Carl Anh Cuong Cao Vu
Thank you Jesus Christ.
User avatar
tienkhoanguyen
PSEUDOCODER
Posts: 2670
Joined: Fri Sep 05, 2014 9:43 am
Location: Texas

God, Jesus Christ, is number one!hehe

Post by tienkhoanguyen »

Jesus Christ!hehe
http://www.mediafire.com/download/6zbpc ... CMP32T.OBJ
http://www.mediafire.com/view/69fxtgl82 ... jccmp32t.c
http://www.mediafire.com/download/0m3kn ... CMP32T.EXE


Well, this version has been tested in MS-DOS 6.22 so it is fine now.

Remember, if you do a batch compression - you need to remove all numbers.

The numbers mess everything up since the outputs are numbers too.

It gets confused.

hehe

Thank you God my mom is still alive today - I saw her this morning!

My real mom is Huong Thi Vu.
My real dad is Nguyen Binh Thuy.
God, Jesus Christ, is number one!hehe
Jesus Christ!hehe
Bless Jesus Christ!
Then please bless my mom.
Honour to my mom Huong Thi Vu
Honour to my dad Thuy Binh Nguyen
Love to cousin Carl Anh Cuong Cao Vu
Thank you Jesus Christ.
User avatar
tienkhoanguyen
PSEUDOCODER
Posts: 2670
Joined: Fri Sep 05, 2014 9:43 am
Location: Texas

God, Jesus Christ, is number one!hehe

Post by tienkhoanguyen »

Jesus Christ!hehe

Here is a really cool update. It has two new features that you might end up wanting. It makes a backup of FILELIST.CMP which is really necessary for you to do batch decompression. It also allows doing another batch compression on top of the previous one instead of having you delete all the numbers first. This is handy if you are in a hurry. However, a clean slate is always better and safer in 99.9% of the cases!

http://www.mediafire.com/download/uz1bi ... CMP32Z.OBJ

http://www.mediafire.com/view/tyfbn7ti2 ... cmp32z.bk1

http://www.mediafire.com/view/w9hoogwn0 ... jccmp32z.c

http://www.mediafire.com/download/foj01 ... CMP32Z.EXE


Thank you God I have my mother until at least she is one hundred years old!!!!!!!!!!!!
God, Jesus Christ, is number one!hehe
Jesus Christ!hehe
Bless Jesus Christ!
Then please bless my mom.
Honour to my mom Huong Thi Vu
Honour to my dad Thuy Binh Nguyen
Love to cousin Carl Anh Cuong Cao Vu
Thank you Jesus Christ.
Post Reply