Results 1 to 13 of 13

Thread: Charles Ashford's COMPRESS

  1. #1
    Member
    Join Date
    May 2012
    Location
    United States
    Posts
    343
    Thanks
    200
    Thanked 58 Times in 42 Posts

    Charles Ashford's COMPRESS

    Hi everybody,

    I've attached an old arithmetic coder named "COMPRESS" by Charles Ashford. This program did great things for its time with extremely low resource requirements. It was very, very slow as well but achieved the best compression ratio.

    I've attached the source code. Could someone make a 32-bit/NT compile of the two programs (compress.c and expand.c) into 2 EXE files for me?

    I have a new Win7 64-bit test machine and I only have 16-bit compiles of the program so they don't run on 64-bit OS's.

    Thanks guys and enjoy the historical wonder for those of you who don't have it
    Attached Files Attached Files

  2. #2
    Member biject.bwts's Avatar
    Join Date
    Jun 2008
    Location
    texas
    Posts
    449
    Thanks
    23
    Thanked 14 Times in 10 Posts
    I did a quick look at it had to add an include to string.h and replaced movmem with memmove dropped the occurances of far. It compliled with out errors but did not run. so not sure what the "far" or "movmem" did and replaced farmalloc with malloc. But in the end it did not run.

  3. #3
    Member
    Join Date
    May 2012
    Location
    United States
    Posts
    343
    Thanks
    200
    Thanked 58 Times in 42 Posts
    Thank you for trying. Can anybody else get it to work?

  4. #4
    Member biject.bwts's Avatar
    Join Date
    Jun 2008
    Location
    texas
    Posts
    449
    Thanks
    23
    Thanked 14 Times in 10 Posts
    Actaully gave it more thought got it to work compressing test.c order 2 the memmove movmem function need a little more changing not sure if it what you want but here it is
    Attached Files Attached Files

  5. #5
    Member
    Join Date
    May 2012
    Location
    United States
    Posts
    343
    Thanks
    200
    Thanked 58 Times in 42 Posts
    Quote Originally Posted by biject.bwts View Post
    Actaully gave it more thought got it to work compressing test.c order 2 the memmove movmem function need a little more changing not sure if it what you want but here it is
    I will test it when I get home.Thank you.

  6. #6
    Member biject.bwts's Avatar
    Join Date
    Jun 2008
    Location
    texas
    Posts
    449
    Thanks
    23
    Thanked 14 Times in 10 Posts
    Use at your own risk I did not take a major look at code. But
    book1 768,771 compress to and back to same file
    order length

    0 439,714
    1 439,714 looks like order 0 and 1 treated the same
    2 295,216
    3 271,666
    4 271,285 looks best at order 4
    5 277,145
    6 281,815

    *** tried order 10 but it crashed so becareful ***
    so more work may be needed to bring it up to snuff.

  7. #7
    Member
    Join Date
    May 2012
    Location
    United States
    Posts
    343
    Thanks
    200
    Thanked 58 Times in 42 Posts
    Hmm well I never found any documentation that explains or specifies the allowed range. I will try to run it this evening and report back.

  8. #8
    Member
    Join Date
    May 2012
    Location
    United States
    Posts
    343
    Thanks
    200
    Thanked 58 Times in 42 Posts
    Quote Originally Posted by biject.bwts View Post
    Use at your own risk I did not take a major look at code. But
    book1 768,771 compress to and back to same file
    order length

    0 439,714
    1 439,714 looks like order 0 and 1 treated the same
    2 295,216
    3 271,666
    4 271,285 looks best at order 4
    5 277,145
    6 281,815

    *** tried order 10 but it crashed so becareful ***
    so more work may be needed to bring it up to snuff.
    I tried to run it and I get that it is not a valid Win32 application. I am trying to run it first on XP SP3 32-bit before running on Win7.

    Is it possible to make it run on XP SP3 32-bit?

  9. #9
    Member biject.bwts's Avatar
    Join Date
    Jun 2008
    Location
    texas
    Posts
    449
    Thanks
    23
    Thanked 14 Times in 10 Posts
    I compiled it for 64 bit code. Sure you can compile it the source code is there it will likely compile for 32 bit code I think the changes I made would work for 32 bit as well as 64 bit. I only included the 64 bit since you claimed you have a 64 bit machine.
    If you need a free compiler MinGW is free and that is what I used.

  10. #10
    Member
    Join Date
    May 2012
    Location
    United States
    Posts
    343
    Thanks
    200
    Thanked 58 Times in 42 Posts
    Thanks biject.bwts

    But would anyone else be able to help me compile a 32-bit version? I did mention that this will be tested on a Win7 64-bit but also on an older XP 32-bit system. A 32-bit version would therefore work on either machine no problem.

    I do not know anything about programming or compiling, this is why I'm asking for assistance. Any help would be greatly appreciated.

    Thanks.

  11. #11
    Member biject.bwts's Avatar
    Join Date
    Jun 2008
    Location
    texas
    Posts
    449
    Thanks
    23
    Thanked 14 Times in 10 Posts
    Ok here is the 32 bit version. But the code crashes for some inputs I checked this on one case of book1 got same result as the 64 bit version. But if you don't know how to program or compile what is the point. Learn to do it on your own. You can get free stuff on net for MinGW stuff
    Attached Files Attached Files

  12. #12
    Member
    Join Date
    May 2012
    Location
    United States
    Posts
    343
    Thanks
    200
    Thanked 58 Times in 42 Posts
    Quote Originally Posted by biject.bwts View Post
    Ok here is the 32 bit version. But the code crashes for some inputs I checked this on one case of book1 got same result as the 64 bit version. But if you don't know how to program or compile what is the point. Learn to do it on your own. You can get free stuff on net for MinGW stuff
    I appreciate your help and your suggestion

    What is most important about compiling to me is being able to compile some 16-bit DOS code into 32-bit (or 64-bit) windows executable code.

    Again, thanks for your help and your patience.

  13. #13
    Member
    Join Date
    Feb 2013
    Location
    San Diego
    Posts
    1,057
    Thanks
    54
    Thanked 72 Times in 56 Posts
    There would be at least two different 32-bit endpoints, because there are likely to be limits built in that assume a small memory: compile as a Win32 exe, but retain the exact same 16-bit behavior; or, be partially rewritten to become the 32-bit software it would have been if it had been written for 32-bit from the start. Doing the full conversion can be difficult for code you didn't write yourself. Especially for compression code, because compression code works at the bit level and tends to use hardware-level optimizations. The first endpoint would be easiest to do, but 16 bits was small.

    It's been a while since I've seen near and far pointers.
    Last edited by nburns; 18th July 2014 at 04:25.

Similar Threads

  1. Minimal Ashford arithmetic-coder termination
    By Ethatron in forum Data Compression
    Replies: 18
    Last Post: 15th January 2011, 14:38
  2. Charles Blooms new huffman optimisation
    By willvarfar in forum Data Compression
    Replies: 2
    Last Post: 18th August 2010, 10:04
  3. Compress-LZF
    By spark in forum Data Compression
    Replies: 2
    Last Post: 16th October 2009, 00:08
  4. A lot of Compress Algorith to download , here
    By Yuri Grille. in forum Data Compression
    Replies: 2
    Last Post: 20th April 2009, 20:56
  5. pim 2.9 compress mysql 5.1.32 x64 files
    By l1t in forum Data Compression
    Replies: 0
    Last Post: 23rd March 2009, 15:06

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •