Results 1 to 12 of 12

Thread: PAQ8PX for Mac OS X?

  1. #1
    Member
    Join Date
    Jul 2011
    Location
    United States
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    PAQ8PX for Mac OS X?

    Hi all! It's my first post. I'm looking for a version of PAQ8PX that can work in Mac OS X. I can't find one on the 'net. Anyone have any suggestions? They would be much appreciated!

    Thanks!

  2. #2
    Member
    Join Date
    Jun 2009
    Location
    Kraków, Poland
    Posts
    1,471
    Thanks
    26
    Thanked 120 Times in 94 Posts
    PAQ is open source. Did you try compiling it?

  3. #3
    Member
    Join Date
    Jul 2011
    Location
    United States
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    That sort of thing is scary to me. I tried, for example, using Linux for a while but nothing I compiled ever came out right.

  4. #4
    Member
    Join Date
    Jun 2009
    Location
    Kraków, Poland
    Posts
    1,471
    Thanks
    26
    Thanked 120 Times in 94 Posts
    Here's excerpt from paq8l.cpp:
    Code:
    TO COMPILE
    
    There are 2 files: paq8l.cpp (C++) and paq7asm.asm (NASM/YASM).
    paq7asm.asm is the same as in paq7 and paq8x.  paq8l.cpp recognizes the
    following compiler options:
    
      -DWINDOWS           (to compile in Windows)
      -DUNIX              (to compile in Unix, Linux, Solairs, MacOS/Darwin, etc)
      -DNOASM             (to replace paq7asm.asm with equivalent C++)
      -DDEFAULT_OPTION=N  (to change the default compression level from 5 to N).
    
    If you compile without -DWINDOWS or -DUNIX, you can still compress files,
    but you cannot compress directories or create them during extraction.
    You can extract directories if you manually create the empty directories
    first.
    
    Use -DEFAULT_OPTION=N to change the default compression level to support
    drag and drop on machines with less than 256 MB of memory.  Use
    -DDEFAULT_OPTION=4 for 128 MB, 3 for 64 MB, 2 for 32 MB, etc.
    
    Use -DNOASM for non x86-32 machines, or older than a Pentium-MMX (about
    1997), or if you don't have NASM or YASM to assemble paq7asm.asm.  The
    program will still work but it will be slower.  For NASM in Windows,
    use the options "--prefix _" and either "-f win32" or "-f obj" depending
    on your C++ compiler.  In Linux, use "-f elf".
    
    Recommended compiler commands and optimizations:
    
      MINGW g++:
        nasm paq7asm.asm -f win32 --prefix _
        g++ paq8l.cpp -DWINDOWS -O2 -Os -s -march=pentiumpro -fomit-frame-pointer -o paq8l.exe paq7asm.obj
    
      Borland:
        nasm paq7asm.asm -f obj --prefix _
        bcc32 -DWINDOWS -O -w-8027 paq8l.cpp paq7asm.obj
    
      Mars:
        nasm paq7asm.asm -f obj --prefix _
        dmc -DWINDOWS -Ae -O paq8l.cpp paq7asm.obj
    
      UNIX/Linux (PC):
        nasm -f elf paq7asm.asm
        g++ paq8l.cpp -DUNIX -O2 -Os -s -march=pentiumpro -fomit-frame-pointer -o paq8l paq7asm.o
    
      Non PC (e.g. PowerPC under MacOS X)
        g++ paq8l.cpp -O2 -DUNIX -DNOASM -s -o paq8l
    
    MinGW produces faster executables than Borland or Mars, but Intel 9
    is about 4% faster than MinGW).

  5. #5
    Member caveman's Avatar
    Join Date
    Jul 2009
    Location
    Strasbourg, France
    Posts
    190
    Thanks
    8
    Thanked 62 Times in 33 Posts
    I have v44 at hand (it's a bit old from 2009).
    Compiled v69 this way:
    g++ paq8px_v69.cpp -DUNIX -DNOASM -O2 -Os -s -march=pentium-m -fomit-frame-pointer -o paq8px_v69
    Attached Files Attached Files
    Last edited by caveman; 7th July 2011 at 17:31. Reason: Added v69

  6. #6
    Member
    Join Date
    Jul 2011
    Location
    United States
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Wow, thanks both of you!

    Now to figure out how to work the thing... I'm no stranger to DOS but Unix is completely strange to me. I don't even know where to put this file. I suppose I first need to find my way via Terminal to the directory it's in and then check out its switches...

  7. #7
    Member
    Join Date
    Jun 2009
    Location
    Kraków, Poland
    Posts
    1,471
    Thanks
    26
    Thanked 120 Times in 94 Posts
    If you generated file paq8l then you must do "chmod +x paq8l" to make it executable and then execute "./paq8l" provided you are in the directory with that executable.

  8. #8
    Member
    Join Date
    Jul 2011
    Location
    United States
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    It worked! Thanks.

    Is it possible to put a password on a paq8px archive? There doesn't seem to be an option to do that among the options.

  9. #9
    Programmer toffer's Avatar
    Join Date
    May 2008
    Location
    Erfurt, Germany
    Posts
    587
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Code:
    g++ paq8l.cpp -DWINDOWS -O2 -Os -s -march=pentiumpro -fomit-frame-pointer -o paq8l.exe paq7asm.obj
    Does that make any sense? I guess not.
    M1, CMM and other resources - http://sites.google.com/site/toffer86/ or toffer.tk

  10. #10
    Member
    Join Date
    Jun 2009
    Location
    Kraków, Poland
    Posts
    1,471
    Thanks
    26
    Thanked 120 Times in 94 Posts
    Shoal:
    PAQ doesn't support passwords AFAIR. You need to wrap it in some other container that supports password protection, eg 7z.

    toffer:
    In case of GCC I think not. AFAIK only the last (or first I don't remember) specified optimization mode is used.

  11. #11
    Programmer toffer's Avatar
    Join Date
    May 2008
    Location
    Erfurt, Germany
    Posts
    587
    Thanks
    0
    Thanked 0 Times in 0 Posts
    AFAIK the last one. However why should one specify two optimization options?!
    M1, CMM and other resources - http://sites.google.com/site/toffer86/ or toffer.tk

  12. #12
    Expert
    Matt Mahoney's Avatar
    Join Date
    May 2008
    Location
    Melbourne, Florida, USA
    Posts
    3,255
    Thanks
    306
    Thanked 778 Times in 485 Posts
    Probably -O3 instead of -O2 -Os with newer versions of g++. -Os means optimize for size. I seemed to remember it was faster than -O2 by itself and -O2 was faster than -O3, maybe because of a small cache on my machine. Also use -march=native if you don't plan to distribute the code. I didn't see any speed difference for anything newer than pentiumpro but who knows. If you are on a 64 bit system then -fomit-frame-pointer won't do anything either because function arguments are passed in registers. Experiment and let us know what works best.

Similar Threads

  1. paq8px
    By Jan Ondrus in forum Data Compression
    Replies: 1637
    Last Post: 15th July 2019, 17:58
  2. FrontPAQ - GUI frontend for PAQ8PF and PAQ8PX
    By LovePimple in forum Download Area
    Replies: 26
    Last Post: 17th January 2019, 14:36
  3. Alternative paq8px builds
    By M4ST3R in forum Download Area
    Replies: 20
    Last Post: 25th June 2010, 16:19
  4. Optimized paq7asm.asm code not compatible with paq8px?
    By M4ST3R in forum Data Compression
    Replies: 7
    Last Post: 3rd June 2009, 15:34

Posting Permissions

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