Giter Club home page Giter Club logo

afsctool's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

afsctool's Issues

Warnings during compilation

It compiles fine, but the following warnings are shown:

$ make
[ 12%] Building C object CMakeFiles/afsctool.dir/afsctool.c.o
[ 25%] Building CXX object CMakeFiles/afsctool.dir/main.cpp.o
[ 37%] Building CXX object CMakeFiles/afsctool.dir/ParallelProcess.cpp.o
[ 50%] Building CXX object CMakeFiles/afsctool.dir/Thread/Thread.cpp.o
[ 62%] Building CXX object CMakeFiles/afsctool.dir/CritSectEx/CritSectEx.cpp.o
[ 75%] Building CXX object CMakeFiles/afsctool.dir/CritSectEx/msemul.cpp.o
RJVB/afsctool/CritSectEx/msemul.cpp:131:37: warning: cast to 'void *' from smaller integer type 'int'
      [-Wint-to-void-pointer-cast]
        pthread_setspecific( sharedMemKey, (void*) useShared );
                                           ^
RJVB/afsctool/CritSectEx/msemul.cpp:418:11: warning: enumeration values 'MSH_EMPTY' and 'MSH_CLOSED' not
      handled in switch [-Wswitch]
                switch( hHandle->type ){
                        ^
RJVB/afsctool/CritSectEx/msemul.cpp:418:11: note: add missing switch cases
                switch( hHandle->type ){
                        ^
RJVB/afsctool/CritSectEx/msemul.cpp:585:15: warning: enumeration values 'MSH_EMPTY' and 'MSH_CLOSED' not
      handled in switch [-Wswitch]
        else switch( hHandle->type ){
                     ^
RJVB/afsctool/CritSectEx/msemul.cpp:585:15: note: add missing switch cases
        else switch( hHandle->type ){
                     ^
RJVB/afsctool/CritSectEx/msemul.cpp:1722:10: warning: enumeration values 'MSH_EMPTY' and 'MSH_CLOSED'
      not handled in switch [-Wswitch]
        switch( type ){
                ^
RJVB/afsctool/CritSectEx/msemul.cpp:1722:10: note: add missing switch cases
        switch( type ){
                ^
4 warnings generated.
[ 87%] Building C object CMakeFiles/afsctool.dir/CritSectEx/timing.c.o
[100%] Linking CXX executable afsctool
[100%] Built target afsctool

decmpfs.h ?

error

-- LZVN_HEADER,LIB: LZVN_HEADER-NOTFOUND LZVN_LIBRARY-NOTFOUND
-- LZVN support is disabled

code

check_include_file("sys/decmpfs.h" HAS_DECMPFS)
find_file(LZVN_HEADER "FastCompression.h")
find_library(LZVN_LIBRARY "FastCompression")

Are these files not included in the repo for specific reasons?

safe/recommended way to cancel/pause/resume process?

Is there a safe way to cancel or pause the process?

The most common way to cancel a process running in terminal is by pressing Control+C to send the interrupt signal. Is this safe/OK?

Also, would/should I pause the process with:
kill -STOP pid

I would continue with:
kill -CONT pid

Thanks!

Failed to build on M1 - Monterey 12.0.1 with Xcode 13.1

Build on Intel with Mohave worked fine. The referenced make command is not quite correct, it has to be run from the root directory.

But when I was trying to build on Monterey M1 12.0.1 with Xcode 13.1 it failed. Cmake was happy with prerequisites. Brew installs ARM64 in a different location. See attached for build errors, they do not related PKGBUILD.

I presume this is currently not set up for universal anyway.

Build log.txt

Originally posted by @hstriepe in #46 (comment)

Use on hard-linked files?

(Using 1.6.9 built from the git tag)

What happens when afsctool compresses a hardlinked file? Could it be that the other links are truncated and only the processed file gets a resource fork?

The reason I ask is because I'm noticing a bunch of files with 0 bytes that I didn't process with afsctool but maybe I processed one of their hardlinks. The odd thing is that the timestamp of the files was updated, which wouldn't fit this hypothesis, timestamps are stored in the directory, not with the inode, right?

See compression type per-file when listing multiple files?

Bonjour René - ça va?

I can do -v to see compression type used on a file

$ afsctool -v "/Applications/Affinity Designer.app/Contents/PkgInfo"
/Applications/Affinity Designer.app/Contents/PkgInfo:
File is HFS+/APFS compressed.
Compression type: ZLIB in decmpfs xattr (3)
File content type: public.data
File size (uncompressed; reported size by Mac OS 10.6+ Finder): 8 bytes / 0 KB (kilobytes, base-10)
File size (compressed): 0 bytes
Compression savings: 100.0%
Number of extended attributes: 0
Total size of extended attribute data: 0 bytes
Uncompressed file size reported in compressed header: 8 bytes

And I can do -lfvvv to see what files are compressed in a folder.

$ afsctool -vlfvvv "/Applications/Affinity Designer.app"
...
/Applications/Affinity Designer.app/Contents/PkgInfo:
File size (uncompressed data fork; reported size by Mac OS 10.6+ Finder): 8 bytes / 0 KB (kilobytes, base-10)
File size (compressed data fork): 25 bytes
Compression savings: 100.0%
Number of extended attributes: 0
Total size of extended attribute data: 0 bytes
Approximate overhead of extended attributes: 268 bytes

Is there a way I can see compression type per-file when listing multiple files?

Thanks!

Compress, decompress, compress results in lots of mismatch errors

Repro

  1. afsctool -c /Applications/PlayOnMac.app (no errors)
  2. afsctool -d /Applications/PlayOnMac.app (no errors)
  3. afsctool -c -T LZFSE /Applications/PlayOnMac.app (errors!)

Comparison

  1. download new version of the app here
  2. afsctool -c -T LZFSE /Applications/PlayOnMac.app (no errors)

Errors

	size mismatch=0 read=57405 failure=0 content mismatch=1 (Undefined error: 0)
/Applications/PlayOnMac.app/Contents/Resources/unix/wine/lib32on64/wine/ext-ms-win-ntuser-draw-l1-1-0.dll: Compressed file check failed, reverting file changes
	size mismatch=0 read=52611 failure=0 content mismatch=1 (Undefined error: 0)
/Applications/PlayOnMac.app/Contents/Resources/unix/wine/lib32on64/wine/api-ms-win-core-libraryloader-l1-1-0.dll: Compressed file check failed, reverting file changes
	size mismatch=0 read=57535 failure=0 content mismatch=1 (Undefined error: 0)
/Applications/PlayOnMac.app/Contents/Resources/unix/wine/lib32on64/wine/ext-ms-win-security-credui-l1-1-0.dll: Compressed file check failed, reverting file changes
	size mismatch=0 read=57414 failure=0 content mismatch=1 (Undefined error: 0)
/Applications/PlayOnMac.app/Contents/Resources/unix/wine/lib32on64/wine/api-ms-win-security-lsalookup-l2-1-1.dll: Compressed file check failed, reverting file changes
	size mismatch=0 read=57513 failure=0 content mismatch=1 (Undefined error: 0)
/Applications/PlayOnMac.app/Contents/Resources/unix/wine/lib32on64/wine/ext-ms-win-gdi-render-l1-1-0.dll: Compressed file check failed, reverting file changes
	size mismatch=0 read=57411 failure=0 content mismatch=1 (Undefined error: 0)

Incorrect display of folder sizes in human readable form

When I run afsctool -v . in a large folder, I usually get output like this:

Folder size (uncompressed; reported size by Mac OS 10.6+ Finder): 10175898032 bytes / 1.5 TB (terabytes) / 1.37 TiB (tebibytes)
Folder size (compressed - decmpfs xattr; reported size by Mac OS 10.0-10.5 Finder): 5726786210 bytes / 339.74 GB (gigabytes) / 316.41 GiB (gibibytes)
Folder size (compressed): 5956483940 bytes / 339.97 GB (gigabytes) / 316.62 GiB (gibibytes)

Notice the mismatch between the byte count and the human readable form.

10175898032 bytes is actually 9.48 GiB or 10.18 GB.

The byte count is correct (as compared with e.g. the Finder's reporting). The human readable form is wrong.

Time Machine risks?

Does this work with Time Machine volumes or would it cause comparative errors for the backup process?

issues compiling

Last time I tried to compile was in #2 (comment)

I've got further this time, overcoming a few obstacles.

but once again hit a wall.

any help appreciated.

matt$ make
[ 12%] Building C object CMakeFiles/afsctool.dir/afsctool.c.o
[ 25%] Building CXX object CMakeFiles/afsctool.dir/main.cpp.o
[ 37%] Building CXX object CMakeFiles/afsctool.dir/ParallelProcess.cpp.o
[ 50%] Building CXX object CMakeFiles/afsctool.dir/Thread/Thread.cpp.o
/Users/matt/Downloads/2017-11-25/afsctool-master/Thread/Thread.cpp:16:26: warning: implicit conversion of
      NULL constant to 'DWORD' (aka 'unsigned long') [-Wnull-conversion]
DWORD thread2ThreadKey = NULL, thread2ThreadKeyClients = 0;
      ~~~~~~~~~~~~~~~~   ^~~~
                         0
/Users/matt/Downloads/2017-11-25/afsctool-master/Thread/Thread.cpp:143:22: warning: implicit conversion of
      NULL constant to 'DWORD' (aka 'unsigned long') [-Wnull-conversion]
                thread2ThreadKey = NULL;
                                 ~ ^~~~
                                   0
2 warnings generated.
[ 62%] Building CXX object CMakeFiles/afsctool.dir/CritSectEx/CritSectEx.cpp.o
[ 75%] Building CXX object CMakeFiles/afsctool.dir/CritSectEx/msemul.cpp.o
/Users/matt/Downloads/2017-11-25/afsctool-master/CritSectEx/msemul.cpp:37:10: fatal error: 
      'sparsehash/dense_hash_map' file not found
#include <sparsehash/dense_hash_map>
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make[2]: *** [CMakeFiles/afsctool.dir/CritSectEx/msemul.cpp.o] Error 1
make[1]: *** [CMakeFiles/afsctool.dir/all] Error 2
make: *** [all] Error 2
MacBookPro-Matt:afsctool-master matt$ fixopenwith
MacBookPro-Matt:afsctool-master matt$ make
[ 12%] Building CXX object CMakeFiles/afsctool.dir/CritSectEx/msemul.cpp.o
/Users/matt/Downloads/2017-11-25/afsctool-master/CritSectEx/msemul.cpp:37:10: fatal error: 
      'sparsehash/dense_hash_map' file not found
#include <sparsehash/dense_hash_map>
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make[2]: *** [CMakeFiles/afsctool.dir/CritSectEx/msemul.cpp.o] Error 1
make[1]: *** [CMakeFiles/afsctool.dir/all] Error 2
make: *** [all] Error 2

Need pkgconfig

brew install pkgconfig
should go in the instructions.

Unable to build LZVN on apple m1

I'm trying to install your LZVN fork on a macbook air (m1) as described in the README.md but for some reason it fails.

➜  LZVN git:(RJVB) ✗ which clang
/usr/bin/clang
➜  LZVN git:(RJVB) ✗ clang -v
Apple clang version 12.0.5 (clang-1205.0.22.11)
Target: arm64-apple-darwin20.5.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
➜  build git:(RJVB) ✗ cmake ..
-- The C compiler identification is AppleClang 12.0.5.12050022
-- The ASM compiler identification is Clang
-- Found assembler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- The ASM compiler identification is Clang
-- Found assembler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Setting lzvn version to: 1.0.0-18-g9a03cb6
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/tristank/Documents/Code/git/github/LZVN/build
➜  build git:(RJVB) ✗ ls -la
total 80
drwxr-xr-x   7 tristank  staff    224 29 Sep 22:01 .
drwxr-xr-x@ 21 tristank  staff    672 29 Sep 22:00 ..
-rw-r--r--   1 tristank  staff  15211 29 Sep 22:01 CMakeCache.txt
drwxr-xr-x  17 tristank  staff    544 29 Sep 22:01 CMakeFiles
-rw-r--r--   1 tristank  staff  11098 29 Sep 22:01 Makefile
-rw-r--r--   1 tristank  staff   4654 29 Sep 22:01 cmake_install.cmake
-rw-r--r--   1 tristank  staff    389 29 Sep 22:01 lzvn_fullversion.h
➜  build git:(RJVB) ✗ make
Scanning dependencies of target FastCompression
[  8%] Building ASM object CMakeFiles/FastCompression.dir/lzvn_decode.S.o
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:8:8: error: unknown token in expression
 pushq %rbp
       ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:8:8: error: invalid operand
 pushq %rbp
       ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:9:7: error: unknown token in expression
 movq %rsp, %rbp
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:9:7: error: invalid operand
 movq %rsp, %rbp
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:10:8: error: unknown token in expression
 pushq %rbx
       ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:10:8: error: invalid operand
 pushq %rbx
       ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:11:8: error: unknown token in expression
 pushq %r12
       ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:11:8: error: invalid operand
 pushq %r12
       ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:12:31: error: unexpected token in argument list
 leaq Lzvn_decode.opcode_table(%rip), %rbx
                              ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:14:7: error: unknown token in expression
 xorq %rax, %rax
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:14:7: error: invalid operand
 xorq %rax, %rax
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:15:7: error: unknown token in expression
 xorq %r12, %r12
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:15:7: error: invalid operand
 xorq %r12, %r12
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:16:11: error: unknown token in expression
 subq $8, %rsi
          ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:16:11: error: invalid operand
 subq $8, %rsi
          ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:17:2: error: unrecognized instruction mnemonic, did you mean: b, bl, br?
 jb L_0x2b4
 ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:18:9: error: unexpected token in argument list
 leaq -8(%rdx,%rcx), %rcx
        ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:19:7: error: unknown token in expression
 cmpq %rcx, %rdx
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:19:7: error: invalid operand
 cmpq %rcx, %rdx
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:20:2: error: unrecognized instruction mnemonic
 ja L_0x2b4
 ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:21:10: error: unknown token in expression
 movzbq (%rdx), %r9
         ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:21:9: error: invalid operand
 movzbq (%rdx), %r9
        ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:22:8: error: unknown token in expression
 movq (%rdx), %r8
       ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:22:7: error: invalid operand
 movq (%rdx), %r8
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:23:7: error: unknown token in expression
 jmpq *(%rbx,%r9,8)
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:23:7: error: invalid operand
 jmpq *(%rbx,%r9,8)
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:26:11: error: unknown token in expression
 addq $1, %rdx
          ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:26:11: error: invalid operand
 addq $1, %rdx
          ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:27:7: error: unknown token in expression
 cmpq %rcx, %rdx
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:27:7: error: invalid operand
 cmpq %rcx, %rdx
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:28:2: error: unrecognized instruction mnemonic
 ja L_0x2b4
 ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:29:10: error: unknown token in expression
 movzbq (%rdx), %r9
         ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:29:9: error: invalid operand
 movzbq (%rdx), %r9
        ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:30:8: error: unknown token in expression
 movq (%rdx), %r8
       ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:30:7: error: invalid operand
 movq (%rdx), %r8
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:31:7: error: unknown token in expression
 jmpq *(%rbx,%r9,8)
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:31:7: error: invalid operand
 jmpq *(%rbx,%r9,8)
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:32:7: error: unknown token in expression
 nopw %cs:(%rax,%rax)
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:32:7: error: invalid operand
 nopw %cs:(%rax,%rax)
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:36:11: error: unknown token in expression
 shrq $6, %r9
          ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:36:11: error: invalid operand
 shrq $6, %r9
          ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:37:8: error: unexpected token in argument list
 leaq 2(%rdx,%r9), %rdx
       ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:38:7: error: unknown token in expression
 cmpq %rcx, %rdx
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:38:7: error: invalid operand
 cmpq %rcx, %rdx
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:39:2: error: unrecognized instruction mnemonic
 ja L_0x2b4
 ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:40:7: error: unknown token in expression
 movq %r8, %r12
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:40:7: error: invalid operand
 movq %r8, %r12
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:41:9: error: unknown token in expression
 bswapq %r12
        ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:41:9: error: invalid operand
 bswapq %r12
        ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:42:7: error: unknown token in expression
 movq %r12, %r10
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:42:7: error: invalid operand
 movq %r12, %r10
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:43:11: error: unknown token in expression
 shlq $5, %r12
          ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:43:11: error: invalid operand
 shlq $5, %r12
          ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:44:11: error: unknown token in expression
 shlq $2, %r10
          ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:44:11: error: invalid operand
 shlq $2, %r10
          ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:45:12: error: unknown token in expression
 shrq $53, %r12
           ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:45:12: error: invalid operand
 shrq $53, %r12
           ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:46:12: error: unknown token in expression
 shrq $61, %r10
           ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:46:12: error: invalid operand
 shrq $61, %r10
           ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:47:12: error: unknown token in expression
 shrq $16, %r8
           ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:47:12: error: invalid operand
 shrq $16, %r8
           ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:48:11: error: unknown token in expression
 addq $3, %r10
          ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:48:11: error: invalid operand
 addq $3, %r10
          ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:51:8: error: unknown token in expression
 leaq (%rax,%r9), %r11
       ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:51:7: error: invalid operand
 leaq (%rax,%r9), %r11
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:52:7: error: unknown token in expression
 addq %r10, %r11
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:52:7: error: invalid operand
 addq %r10, %r11
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:53:7: error: unknown token in expression
 cmpq %rsi, %r11
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:53:7: error: invalid operand
 cmpq %rsi, %r11
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:54:2: error: unrecognized instruction mnemonic
 jae L_0x0d2
 ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:55:7: error: unknown token in expression
 movq %r8, (%rdi,%rax)
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:55:7: error: invalid operand
 movq %r8, (%rdi,%rax)
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:56:7: error: unknown token in expression
 addq %r9, %rax
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:56:7: error: invalid operand
 addq %r9, %rax
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:57:7: error: unknown token in expression
 movq %rax, %r8
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:57:7: error: invalid operand
 movq %rax, %r8
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:58:7: error: unknown token in expression
 subq %r12, %r8
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:58:7: error: invalid operand
 subq %r12, %r8
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:59:2: error: unrecognized instruction mnemonic, did you mean: b, bl, br?
 jb L_0x2b4
 ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:60:11: error: unknown token in expression
 cmpq $8, %r12
          ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:60:11: error: invalid operand
 cmpq $8, %r12
          ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:61:2: error: unrecognized instruction mnemonic, did you mean: b, bl, br?
 jb L_0x102
 ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:64:8: error: unknown token in expression
 movq (%rdi,%r8), %r9
       ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:64:7: error: invalid operand
 movq (%rdi,%r8), %r9
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:65:11: error: unknown token in expression
 addq $8, %r8
          ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:65:11: error: invalid operand
 addq $8, %r8
          ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:66:7: error: unknown token in expression
 movq %r9, (%rdi,%rax)
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:66:7: error: invalid operand
 movq %r9, (%rdi,%rax)
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:67:11: error: unknown token in expression
 addq $8, %rax
          ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:67:11: error: invalid operand
 addq $8, %rax
          ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:68:11: error: unknown token in expression
 subq $8, %r10
          ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:68:11: error: invalid operand
 subq $8, %r10
          ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:69:2: error: unrecognized instruction mnemonic
 ja L_0x0ae
 ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:70:7: error: unknown token in expression
 addq %r10, %rax
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:70:7: error: invalid operand
 addq %r10, %rax
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:71:10: error: unknown token in expression
 movzbq (%rdx), %r9
         ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:71:9: error: invalid operand
 movzbq (%rdx), %r9
        ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:72:8: error: unknown token in expression
 movq (%rdx), %r8
       ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:72:7: error: invalid operand
 movq (%rdx), %r8
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:73:7: error: unknown token in expression
 jmpq *(%rbx,%r9,8)
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:73:7: error: invalid operand
 jmpq *(%rbx,%r9,8)
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:76:8: error: unknown token in expression
 testq %r9, %r9
       ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:76:8: error: invalid operand
 testq %r9, %r9
       ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:77:2: error: unrecognized instruction mnemonic
 je L_0x0f6
 ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:78:8: error: unexpected token in argument list
 leaq 8(%rsi), %r11
       ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:81:7: error: unknown token in expression
 movb %r8b, (%rdi,%rax)
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:81:7: error: invalid operand
 movb %r8b, (%rdi,%rax)
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:82:11: error: unknown token in expression
 addq $1, %rax
          ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:82:11: error: invalid operand
 addq $1, %rax
          ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:83:7: error: unknown token in expression
 cmpq %rax, %r11
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:83:7: error: invalid operand
 cmpq %rax, %r11
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:84:2: error: unrecognized instruction mnemonic
 je L_0x2b7
 ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:85:11: error: unknown token in expression
 shrq $8, %r8
          ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:85:11: error: invalid operand
 shrq $8, %r8
          ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:86:11: error: unknown token in expression
 subq $1, %r9
          ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:86:11: error: invalid operand
 subq $1, %r9
          ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:87:2: error: unrecognized instruction mnemonic, did you mean: neg?
 jne L_0x0db
 ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:90:7: error: unknown token in expression
 movq %rax, %r8
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:90:7: error: invalid operand
 movq %rax, %r8
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:91:7: error: unknown token in expression
 subq %r12, %r8
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:91:7: error: invalid operand
 subq %r12, %r8
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:92:2: error: unrecognized instruction mnemonic, did you mean: b, bl, br?
 jb L_0x2b4
 ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:95:8: error: unexpected token in argument list
 leaq 8(%rsi), %r11
       ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:98:10: error: unknown token in expression
 movzbq (%rdi,%r8), %r9
         ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:98:9: error: invalid operand
 movzbq (%rdi,%r8), %r9
        ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:99:11: error: unknown token in expression
 addq $1, %r8
          ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:99:11: error: invalid operand
 addq $1, %r8
          ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:100:7: error: unknown token in expression
 movb %r9b, (%rdi,%rax)
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:100:7: error: invalid operand
 movb %r9b, (%rdi,%rax)
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:101:11: error: unknown token in expression
 addq $1, %rax
          ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:101:11: error: invalid operand
 addq $1, %rax
          ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:102:7: error: unknown token in expression
 cmpq %rax, %r11
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:102:7: error: invalid operand
 cmpq %rax, %r11
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:103:2: error: unrecognized instruction mnemonic
 je L_0x2b7
 ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:104:11: error: unknown token in expression
 subq $1, %r10
          ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:104:11: error: invalid operand
 subq $1, %r10
          ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:105:2: error: unrecognized instruction mnemonic, did you mean: neg?
 jne L_0x106
 ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:106:10: error: unknown token in expression
 movzbq (%rdx), %r9
         ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:106:9: error: invalid operand
 movzbq (%rdx), %r9
        ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:107:8: error: unknown token in expression
 movq (%rdx), %r8
       ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:107:7: error: invalid operand
 movq (%rdx), %r8
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:108:7: error: unknown token in expression
 jmpq *(%rbx,%r9,8)
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:108:7: error: invalid operand
 jmpq *(%rbx,%r9,8)
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:111:11: error: unknown token in expression
 shrq $6, %r9
          ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:111:11: error: invalid operand
 shrq $6, %r9
          ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:112:8: error: unexpected token in argument list
 leaq 1(%rdx,%r9), %rdx
       ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:113:7: error: unknown token in expression
 cmpq %rcx, %rdx
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:113:7: error: invalid operand
 cmpq %rcx, %rdx
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:114:2: error: unrecognized instruction mnemonic
 ja L_0x2b4
 ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:115:12: error: unknown token in expression
 movq $56, %r10
           ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:115:12: error: invalid operand
 movq $56, %r10
           ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:116:7: error: unknown token in expression
 andq %r8, %r10
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:116:7: error: invalid operand
 andq %r8, %r10
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:117:11: error: unknown token in expression
 shrq $8, %r8
          ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:117:11: error: invalid operand
 shrq $8, %r8
          ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:118:11: error: unknown token in expression
 shrq $3, %r10
          ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:118:11: error: invalid operand
 shrq $3, %r10
          ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:119:11: error: unknown token in expression
 addq $3, %r10
          ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:119:11: error: invalid operand
 addq $3, %r10
          ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:120:2: error: unrecognized instruction mnemonic, did you mean: cmp?
 jmp L_0x089
 ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:123:11: error: unknown token in expression
 shrq $6, %r9
          ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:123:11: error: invalid operand
 shrq $6, %r9
          ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:124:8: error: unexpected token in argument list
 leaq 3(%rdx,%r9), %rdx
       ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:125:7: error: unknown token in expression
 cmpq %rcx, %rdx
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:125:7: error: invalid operand
 cmpq %rcx, %rdx
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:126:2: error: unrecognized instruction mnemonic
 ja L_0x2b4
 ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:127:12: error: unknown token in expression
 movq $56, %r10
           ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:127:12: error: invalid operand
 movq $56, %r10
           ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:128:15: error: unknown token in expression
 movq $65535, %r12
              ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:128:15: error: invalid operand
 movq $65535, %r12
              ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:129:7: error: unknown token in expression
 andq %r8, %r10
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:129:7: error: invalid operand
 andq %r8, %r10
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:130:11: error: unknown token in expression
 shrq $8, %r8
          ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:130:11: error: invalid operand
 shrq $8, %r8
          ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:131:11: error: unknown token in expression
 shrq $3, %r10
          ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:131:11: error: invalid operand
 shrq $3, %r10
          ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:132:7: error: unknown token in expression
 andq %r8, %r12
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:132:7: error: invalid operand
 andq %r8, %r12
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:133:12: error: unknown token in expression
 shrq $16, %r8
           ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:133:12: error: invalid operand
 shrq $16, %r8
           ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:134:11: error: unknown token in expression
 addq $3, %r10
          ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:134:11: error: invalid operand
 addq $3, %r10
          ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:135:2: error: unrecognized instruction mnemonic, did you mean: cmp?
 jmp L_0x089
 ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:138:11: error: unknown token in expression
 shrq $3, %r9
          ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:138:11: error: invalid operand
 shrq $3, %r9
          ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:139:11: error: unknown token in expression
 andq $3, %r9
          ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:139:11: error: invalid operand
 andq $3, %r9
          ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:140:8: error: unexpected token in argument list
 leaq 3(%rdx,%r9), %rdx
       ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:141:7: error: unknown token in expression
 cmpq %rcx, %rdx
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:141:7: error: invalid operand
 cmpq %rcx, %rdx
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:142:2: error: unrecognized instruction mnemonic
 ja L_0x2b4
 ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:143:7: error: unknown token in expression
 movq %r8, %r10
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:143:7: error: invalid operand
 movq %r8, %r10
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:144:13: error: unknown token in expression
 andq $775, %r10
            ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:144:13: error: invalid operand
 andq $775, %r10
            ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:145:12: error: unknown token in expression
 shrq $10, %r8
           ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:145:12: error: invalid operand
 shrq $10, %r8
           ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:146:9: error: unknown token in expression
 movzbq %r10b, %r12
        ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:146:9: error: invalid operand
 movzbq %r10b, %r12
        ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:147:11: error: unknown token in expression
 shrq $8, %r10
          ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:147:11: error: invalid operand
 shrq $8, %r10
          ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:148:11: error: unknown token in expression
 shlq $2, %r12
          ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:148:11: error: invalid operand
 shlq $2, %r12
          ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:149:6: error: unknown token in expression
 orq %r12, %r10
     ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:149:6: error: invalid operand
 orq %r12, %r10
     ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:150:15: error: unknown token in expression
 movq $16383, %r12
              ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:150:15: error: invalid operand
 movq $16383, %r12
              ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:151:11: error: unknown token in expression
 addq $3, %r10
          ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:151:11: error: invalid operand
 addq $3, %r10
          ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:152:7: error: unknown token in expression
 andq %r8, %r12
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:152:7: error: invalid operand
 andq %r8, %r12
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:153:12: error: unknown token in expression
 shrq $14, %r8
           ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:153:12: error: invalid operand
 shrq $14, %r8
           ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:154:2: error: unrecognized instruction mnemonic, did you mean: cmp?
 jmp L_0x089
 ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:157:11: error: unknown token in expression
 addq $1, %rdx
          ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:157:11: error: invalid operand
 addq $1, %rdx
          ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:158:7: error: unknown token in expression
 cmpq %rcx, %rdx
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:158:7: error: invalid operand
 cmpq %rcx, %rdx
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:159:2: error: unrecognized instruction mnemonic
 ja L_0x2b4
 ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:160:7: error: unknown token in expression
 movq %r8, %r10
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:160:7: error: invalid operand
 movq %r8, %r10
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:161:12: error: unknown token in expression
 andq $15, %r10
           ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:161:12: error: invalid operand
 andq $15, %r10
           ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:162:2: error: unrecognized instruction mnemonic, did you mean: cmp?
 jmp L_0x218
 ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:165:11: error: unknown token in expression
 addq $2, %rdx
          ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:165:11: error: invalid operand
 addq $2, %rdx
          ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:166:7: error: unknown token in expression
 cmpq %rcx, %rdx
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:166:7: error: invalid operand
 cmpq %rcx, %rdx
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:167:2: error: unrecognized instruction mnemonic
 ja L_0x2b4
 ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:168:7: error: unknown token in expression
 movq %r8, %r10
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:168:7: error: invalid operand
 movq %r8, %r10
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:169:11: error: unknown token in expression
 shrq $8, %r10
          ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:169:11: error: invalid operand
 shrq $8, %r10
          ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:170:13: error: unknown token in expression
 andq $255, %r10
            ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:170:13: error: invalid operand
 andq $255, %r10
            ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:171:12: error: unknown token in expression
 addq $16, %r10
           ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:171:12: error: invalid operand
 addq $16, %r10
           ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:174:7: error: unknown token in expression
 movq %rax, %r8
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:174:7: error: invalid operand
 movq %rax, %r8
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:175:7: error: unknown token in expression
 subq %r12, %r8
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:175:7: error: invalid operand
 subq %r12, %r8
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:176:8: error: unknown token in expression
 leaq (%rax,%r10), %r11
       ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:176:7: error: invalid operand
 leaq (%rax,%r10), %r11
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:177:7: error: unknown token in expression
 cmpq %rsi, %r11
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:177:7: error: invalid operand
 cmpq %rsi, %r11
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:178:2: error: unrecognized instruction mnemonic
 jae L_0x102
 ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:179:11: error: unknown token in expression
 cmpq $8, %r12
          ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:179:11: error: invalid operand
 cmpq $8, %r12
          ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:180:2: error: unrecognized instruction mnemonic
 jae L_0x0ae
 ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:181:2: error: unrecognized instruction mnemonic, did you mean: cmp?
 jmp L_0x102
 ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:184:12: error: unknown token in expression
 andq $15, %r8
           ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:184:12: error: invalid operand
 andq $15, %r8
           ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:185:8: error: unexpected token in argument list
 leaq 1(%rdx,%r8), %rdx
       ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:186:2: error: unrecognized instruction mnemonic, did you mean: cmp?
 jmp L_0x259
 ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:189:11: error: unknown token in expression
 shrq $8, %r8
          ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:189:11: error: invalid operand
 shrq $8, %r8
          ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:190:13: error: unknown token in expression
 andq $255, %r8
            ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:190:13: error: invalid operand
 andq $255, %r8
            ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:191:12: error: unknown token in expression
 addq $16, %r8
           ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:191:12: error: invalid operand
 addq $16, %r8
           ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:192:8: error: unexpected token in argument list
 leaq 2(%rdx,%r8), %rdx
       ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:195:7: error: unknown token in expression
 cmpq %rcx, %rdx
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:195:7: error: invalid operand
 cmpq %rcx, %rdx
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:196:2: error: unrecognized instruction mnemonic
 ja L_0x2b4
 ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:197:8: error: unknown token in expression
 leaq (%rax,%r8), %r11
       ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:197:7: error: invalid operand
 leaq (%rax,%r8), %r11
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:198:7: error: unknown token in expression
 negq %r8
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:198:7: error: invalid operand
 negq %r8
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:199:7: error: unknown token in expression
 cmpq %rsi, %r11
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:199:7: error: invalid operand
 cmpq %rsi, %r11
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:200:2: error: unrecognized instruction mnemonic
 ja L_0x28d
 ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:201:8: error: unknown token in expression
 leaq (%rdi,%r11), %r11
       ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:201:7: error: invalid operand
 leaq (%rdi,%r11), %r11
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:204:8: error: unknown token in expression
 movq (%rdx,%r8), %r9
       ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:204:7: error: invalid operand
 movq (%rdx,%r8), %r9
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:205:7: error: unknown token in expression
 movq %r9, (%r11,%r8)
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:205:7: error: invalid operand
 movq %r9, (%r11,%r8)
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:206:11: error: unknown token in expression
 addq $8, %r8
          ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:206:11: error: invalid operand
 addq $8, %r8
          ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:207:2: error: unrecognized instruction mnemonic
 jae L_0x26e
 ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:208:7: error: unknown token in expression
 movq %r11, %rax
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:208:7: error: invalid operand
 movq %r11, %rax
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:209:7: error: unknown token in expression
 subq %rdi, %rax
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:209:7: error: invalid operand
 subq %rdi, %rax
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:210:10: error: unknown token in expression
 movzbq (%rdx), %r9
         ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:210:9: error: invalid operand
 movzbq (%rdx), %r9
        ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:211:8: error: unknown token in expression
 movq (%rdx), %r8
       ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:211:7: error: invalid operand
 movq (%rdx), %r8
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:212:7: error: unknown token in expression
 jmpq *(%rbx,%r9,8)
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:212:7: error: invalid operand
 jmpq *(%rbx,%r9,8)
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:215:8: error: unexpected token in argument list
 leaq 8(%rsi), %r11
       ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:218:10: error: unknown token in expression
 movzbq (%rdx,%r8), %r9
         ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:218:9: error: invalid operand
 movzbq (%rdx,%r8), %r9
        ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:219:7: error: unknown token in expression
 movb %r9b, (%rdi,%rax)
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:219:7: error: invalid operand
 movb %r9b, (%rdi,%rax)
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:220:11: error: unknown token in expression
 addq $1, %rax
          ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:220:11: error: invalid operand
 addq $1, %rax
          ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:221:7: error: unknown token in expression
 cmpq %rax, %r11
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:221:7: error: invalid operand
 cmpq %rax, %r11
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:222:2: error: unrecognized instruction mnemonic
 je L_0x2b7
 ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:223:11: error: unknown token in expression
 addq $1, %r8
          ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:223:11: error: invalid operand
 addq $1, %r8
          ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:224:2: error: unrecognized instruction mnemonic, did you mean: neg?
 jne L_0x291
 ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:225:10: error: unknown token in expression
 movzbq (%rdx), %r9
         ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:225:9: error: invalid operand
 movzbq (%rdx), %r9
        ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:226:8: error: unknown token in expression
 movq (%rdx), %r8
       ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:226:7: error: invalid operand
 movq (%rdx), %r8
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:227:7: error: unknown token in expression
 jmpq *(%rbx,%r9,8)
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:227:7: error: invalid operand
 jmpq *(%rbx,%r9,8)
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:230:7: error: unknown token in expression
 xorq %rax, %rax
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:230:7: error: invalid operand
 xorq %rax, %rax
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:233:7: error: unknown token in expression
 popq %r12
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:233:7: error: invalid operand
 popq %r12
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:234:7: error: unknown token in expression
 popq %rbx
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:234:7: error: invalid operand
 popq %rbx
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:235:7: error: unknown token in expression
 popq %rbp
      ^
/Users/tristank/Documents/Code/git/github/LZVN/lzvn_decode.S:235:7: error: invalid operand
 popq %rbp
      ^
make[2]: *** [CMakeFiles/FastCompression.dir/lzvn_decode.S.o] Error 1
make[1]: *** [CMakeFiles/FastCompression.dir/all] Error 2
make: *** [all] Error 2

building for macOS-x86_64 but attempting to link with file built for macOS-arm64

I don't know why but for some reason the architectures are mixed up in the process of compiling them. Not sure if this is my fault.

➜  build git:(master) cmake ..
-- sizeof(void*)=8
CMake Warning (dev) at /opt/homebrew/Cellar/cmake/3.21.2/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
  The package name passed to `find_package_handle_standard_args` (PkgConfig)
  does not match the name of the calling package (ZLIBP).  This can lead to
  problems in calling code that expects `find_package` result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  /opt/homebrew/Cellar/cmake/3.21.2/share/cmake/Modules/FindPkgConfig.cmake:70 (find_package_handle_standard_args)
  _cmake/modules/FindZLIBP.cmake:3 (include)
  CMakeLists.txt:58 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at /opt/homebrew/Cellar/cmake/3.21.2/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
  The package name passed to `find_package_handle_standard_args` (PkgConfig)
  does not match the name of the calling package (SPARSEHASH).  This can lead
  to problems in calling code that expects `find_package` result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  /opt/homebrew/Cellar/cmake/3.21.2/share/cmake/Modules/FindPkgConfig.cmake:70 (find_package_handle_standard_args)
  _cmake/modules/FindSPARSEHASH.cmake:3 (include)
  CMakeLists.txt:59 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- LZVN_HEADER,LIB: LZVN_HEADER-NOTFOUND LZVN_LIBRARY-NOTFOUND
-- LZVN support is disabled
-- Setting afsctool version to: 1.7.0. (1.7.0-9-gf0dea7c)
-- The following OPTIONAL packages have been found:

 * Git

-- The following REQUIRED packages have been found:

 * ZLIBP (required version >= 1.2.8), zlib compression library, <http://www.zlib.net/>
 * SPARSEHASH, An extremely memory-efficient hash_map implementation, <https://github.com/sparsehash/sparsehash>

-- Configuring done
-- Generating done
-- Build files have been written to: /Users/tristank/Documents/Code/git/github/afsctool/build
➜  build git:(master) make
[  9%] Building CXX object CMakeFiles/PP.dir/src/utils.cpp.o
[ 18%] Building CXX object CMakeFiles/PP.dir/src/ParallelProcess.cpp.o
[ 27%] Building CXX object CMakeFiles/PP.dir/src/Thread/Thread.cpp.o
[ 36%] Building CXX object CMakeFiles/PP.dir/src/CritSectEx/CritSectEx.cpp.o
[ 45%] Building CXX object CMakeFiles/PP.dir/src/CritSectEx/msemul.cpp.o
[ 54%] Building C object CMakeFiles/PP.dir/src/CritSectEx/timing.c.o
[ 54%] Built target PP
[ 63%] Building CXX object CMakeFiles/zfsctool.dir/src/zfsctool.cpp.o
[ 72%] Linking CXX executable zfsctool
[ 72%] Built target zfsctool
[ 81%] Building C object CMakeFiles/afsctool.dir/src/afsctool.c.o
[ 90%] Building CXX object CMakeFiles/afsctool.dir/src/main.cpp.o
[100%] Linking CXX executable afsctool
ld: warning: ignoring file /opt/homebrew/Cellar/zlib/1.2.11/lib/libz.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64
Undefined symbols for architecture x86_64:
  "_compress2", referenced from:
      _compressFile in afsctool.c.o
  "_compressBound", referenced from:
      _compressFile in afsctool.c.o
  "_uncompress", referenced from:
      _decompressFile in afsctool.c.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [afsctool] Error 1
make[1]: *** [CMakeFiles/afsctool.dir/all] Error 2
make: *** [all] Error 2

-t and -i options usage

I have spent long time trying to figure out how to compress files excluding specifix extensions and can not figure out how to do it.

Lets say I want to compress all files but JPG,jpg,JPEG,jpeg

Now when I try:

afsctool -c -i -t JPG,jpg,JPEG,jpeg -v -T LZFSE .

it still compress these files.

I know I can use -s option but objective here is to speed up compressing many TB of data where many files are simply not compressible so it is much better to exclude them from the start.

I have played with -t option but genuinely can't figure out how to use it to get expected results. Neither exlusion nor inclusion.

Anybody used these options sucessfully and could give me a hint what I am doing wrong?

how to compile

How do I compile your afsctool fork?

$ brew install cmake pkg-config
$ cmake .
-- Found PkgConfig: /usr/local/bin/pkg-config (found version "0.29.2") 
-- Checking for module 'libsparsehash'
--   No package 'libsparsehash' found
-- 
-- The following REQUIRED packages have been found:

 * ZLIB (required version >= 1.2.8)

-- Configuring done
-- Generating done
-- Build files have been written to: /Users/tristank/Documents/Code/git/afsctool

libsparsehash isnt available for brew - or is it?

cmake libz.dylib error

I've moved to a new mac and need to build this again, but i'm getting a libz.dylib error with Cmake. Can you point me in the right direction? Merci!

i'm using:

Mac OS X
10.13.2 (17C205)

Xcode
9.2 (9C40b)

cmake
3.10.2

what versions of software are you running to have an updated libz.dylib?

MacBookPro-Matt:afsctool-1.6.8.6 matt$ cmake .
CMake Error at /usr/local/Cellar/cmake/3.10.2/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find ZLIB: Found unsuitable version "1.2.3", but required is at
  least "1.2.8" (found /usr/lib/libz.dylib)
Call Stack (most recent call first):
  /usr/local/Cellar/cmake/3.10.2/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:376 (_FPHSA_FAILURE_MESSAGE)
  /usr/local/Cellar/cmake/3.10.2/share/cmake/Modules/FindZLIB.cmake:112 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  CMakeLists.txt:15 (find_package)


-- Configuring incomplete, errors occurred!

Build errors with GCC 5

afsctool fails to build with GCC 5. This seems to be due to some nonstandard language extensions. In particular __has_builtin (added in GCC 6).
And initializing an array with a const int length; const int array[length] = ...; (see, e.g., here)

/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/shims/linux/super/g++-5 -DSUPPORT_PARALLEL -DZFSCTOOL_PROG_NAME="zfsctool" -I/home/linuxbrew/.linuxbrew/Cellar/zlib/1.2.11/include -I/home/linuxbrew/.linuxbrew/Cellar/google-sparsehash/2.0.4/include -I/tmp/afsctool-20220303-4478-1g0rh9p/afsctool-1.7.2 -I/tmp/afsctool-20220303-4478-1g0rh9p/afsctool-1.7.2/src -m64 -O3 -DNDEBUG -std=gnu++11 -MD -MT CMakeFiles/zfsctool.dir/src/zfsctool.cpp.o -MF CMakeFiles/zfsctool.dir/src/zfsctool.cpp.o.d -o CMakeFiles/zfsctool.dir/src/zfsctool.cpp.o -c /tmp/afsctool-20220303-4478-1g0rh9p/afsctool-1.7.2/src/zfsctool.cpp
/tmp/afsctool-20220303-4478-1g0rh9p/afsctool-1.7.2/src/afsctool.c:90:13: error: variably modified ‘sizeunit10_short’ at file scope
const char *sizeunit10_short[sizeunits] = {"KB", "MB", "GB", "TB", "PB", "EB"};
^
/tmp/afsctool-20220303-4478-1g0rh9p/afsctool-1.7.2/src/afsctool.c:91:13: error: variably modified ‘sizeunit10_long’ at file scope
const char *sizeunit10_long[sizeunits] = {"kilobytes", "megabytes", "gigabytes", "terabytes", "petabytes", "exabytes"};
^
/tmp/afsctool-20220303-4478-1g0rh9p/afsctool-1.7.2/src/afsctool.c:92:21: error: variably modified ‘sizeunit10’ at file scope
const long long int sizeunit10[sizeunits] = {1000, 1000 * 1000, 1000 * 1000 * 1000, (long long int) 1000 * 1000 * 1000 * 1000,
^
/tmp/afsctool-20220303-4478-1g0rh9p/afsctool-1.7.2/src/afsctool.c:94:13: error: variably modified ‘sizeunit2_short’ at file scope
const char *sizeunit2_short[sizeunits] = {"KiB", "MiB", "GiB", "TiB", "PiB", "EiB"};
^
/tmp/afsctool-20220303-4478-1g0rh9p/afsctool-1.7.2/src/afsctool.c:95:13: error: variably modified ‘sizeunit2_long’ at file scope
const char *sizeunit2_long[sizeunits] = {"kibibytes", "mebibytes", "gibibytes", "tebibytes", "pebibytes", "exbibytes"};
^
/tmp/afsctool-20220303-4478-1g0rh9p/afsctool-1.7.2/src/afsctool.c:96:21: error: variably modified ‘sizeunit2’ at file scope
const long long int sizeunit2[sizeunits] = {1024, 1024 * 1024, 1024 * 1024 * 1024, (long long int) 1024 * 1024 * 1024 * 1024,
^
/tmp/afsctool-20220303-4478-1g0rh9p/afsctool-1.7.2/src/afsctool.c:103:19: error: missing binary operator before token "("
#if !__has_builtin(__builtin_available)
^
/tmp/afsctool-20220303-4478-1g0rh9p/afsctool-1.7.2/src/afsctool.c: In function ‘afsctool’:
/tmp/afsctool-20220303-4478-1g0rh9p/afsctool-1.7.2/src/afsctool.c:2483:19: error: missing binary operator before token "("
#if !__has_builtin(__builtin_available)
^
CMakeFiles/afsctool.dir/build.make:78: recipe for target 'CMakeFiles/afsctool.dir/src/afsctool.c.o' failed
make[2]: *** [CMakeFiles/afsctool.dir/src/afsctool.c.o] Error 1
make[2]: Leaving directory '/tmp/afsctool-20220303-4478-1g0rh9p/afsctool-1.7.2'
CMakeFiles/Makefile2:115: recipe for target 'CMakeFiles/afsctool.dir/all' failed
make[1]: *** [CMakeFiles/afsctool.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 81%] Linking CXX executable zfsctool
/home/linuxbrew/.linuxbrew/Cellar/cmake/3.22.2/bin/cmake -E cmake_link_script CMakeFiles/zfsctool.dir/link.txt --verbose=1
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/shims/linux/super/g++-5 -m64 -O3 -DNDEBUG -rdynamic CMakeFiles/zfsctool.dir/src/zfsctool.cpp.o CMakeFiles/PP.dir/src/utils.cpp.o CMakeFiles/PP.dir/src/ParallelProcess.cpp.o CMakeFiles/PP.dir/src/Thread/Thread.cpp.o CMakeFiles/PP.dir/src/CritSectEx/CritSectEx.cpp.o CMakeFiles/PP.dir/src/CritSectEx/msemul.cpp.o CMakeFiles/PP.dir/src/CritSectEx/timing.c.o -o zfsctool -lrt -ldl -lbsd -pthread
make[2]: Leaving directory '/tmp/afsctool-20220303-4478-1g0rh9p/afsctool-1.7.2'
[ 81%] Built target zfsctool
make[1]: Leaving directory '/tmp/afsctool-20220303-4478-1g0rh9p/afsctool-1.7.2'
Makefile:93: recipe for target 'all' failed
make: *** [all] Error 2

6_tests (ubuntu-latest, ghcr.iohomebrewubuntu16.04master, --.txt

afsctool breaks binaries, sometimes (HFS+)

Hi :)

I realize this isn't your code per se, but the original developer seems to have completely abandoned it, and it seems like you're pretty active, so I'm giving it a shot :)

Note: This is on HFS+ on macOS 10.13.6. The afsctool comes from MacPorts, but the problem I'm about to describe predates your version.

I just finished reinstalling all my relevant MacPorts, and afterwards I ran afsctool over /opt/local (sudo afsctool -cvkl -9 -m 0 -s 1). Immediately after, I could no longer open an iTerm tab (I use zsh from MacPorts).

I then opened an old-school Terminal session (it uses Apple's bash binary), and doing zsh yields nothing, it's like typing echo. $? => 0, so it doesn't actually error out. zsh --help, nothing.

When doing port selfupdate or any port install command, I get errors like Warning: Error parsing file /opt/local/libexec/git-core/git-cherry-pick: Error mapping file into memory for a whole slew of binaries.

When I saw all this, I remembered the same thing happening many years ago, when I compressed my Homebrew folder with afsctool (the original one, I'm sure). It completely broke everything. The connection here is pretty clear, as I used to install brew in my user folder, meaning it would build binaries rather than use pre-built ones.

I'm wondering if gcc or something is using some kind of funky resource fork mumbo jumbo (I'm not too versed with the HFS+ details) when it creates binaries, and afsctool is somehow messing them up when it compresses them?

Note that I have no experience with this on APFS as I really dislike the newer macOSes (also the newer Macs), so I'm hanging on for dear life to my aging hardware and macOSes XD

Cheers for your support, and have a nice day :)

how many worker threads?

Interestingly, the optimum performance (on large collections) is not necessarily
obtained with as many worker threads as there are CPU cores. Collections with
a significant number of very large files and many more smaller files can apparently
be processed faster when using a rather larger number of workers, with a gain
approaching the number of cores.

how large is "rather large"?

I am trying 200 as using thousands didn't really speed up the process due to the long initialisation.

unknown compression types 7 & 8

  1. Install Safari Technology Preview on macOS High Sierra https://developer.apple.com/safari/technology-preview/
  2. Copy app to test directory
  3. Terminal:
    $ afsctool -d "Safari Technology Preview.app"/
/Users/matt/Downloads/2017-11-27/test/Safari Technology Preview.app//Contents/Frameworks/JavaScriptCore.framework/Versions/A/Resources/jsc: Decompression failed; unknown compression type 8
/Users/matt/Downloads/2017-11-27/test/Safari Technology Preview.app//Contents/Frameworks/JavaScriptCore.framework/Versions/A/Resources/Info.plist: Decompression failed; unknown compression type 7

Are we ready for a new release?

Currently the latest release is still from 2019, but the repository have received a lot of fixes and improvements since then. Do you think the master branch is stable enough to warrant a new release so that people using package managers like MacPorts can get the updated version?

Recovering missing/deleted files

It's a bit of a long shot, but would you have any advice on recovering files that were compressed using this tool but are no longer visible in the file system?

I'm guessing any commercial file recovery software will not understand the compression?

-T LZVN doesn't work

afsctool -T LZVN -c /path/to/random/file
/path/to/random/file: unsupported compression type 2 bytes
Unable to compress file (already compressed).

I think LZVN support is enabled (cmake LZVN repo then cmake afsctool), but it doesn't seem to work on High Sierra.

Compile errors - any ideas?

uname -a
Darwin Superbook.local 18.7.0 Darwin Kernel Version 18.7.0: Mon Aug 31 20:53:32 PDT 2020; root:xnu-4903.278.44~1/RELEASE_X86_64 x86_64

Xcode 11.3.1 (11C504) and command line tools also 11.3.1.

macbook:build risner$ make
Scanning dependencies of target PP
[ 9%] Building CXX object CMakeFiles/PP.dir/src/utils.cpp.o
[ 18%] Building CXX object CMakeFiles/PP.dir/src/ParallelProcess.cpp.o
In file included from /Users/risner/src/afsctool/src/ParallelProcess.cpp:18:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:318:9: error:
no member named 'signbit' in the global namespace
using ::signbit;
~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:319:9: error:
no member named 'fpclassify' in the global namespace
using ::fpclassify;
~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:320:9: error:
no member named 'isfinite' in the global namespace; did you mean 'finite'?
using ::isfinite;
~~^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/math.h:749:12: note:
'finite' declared here
extern int finite(double)
^
In file included from /Users/risner/src/afsctool/src/ParallelProcess.cpp:18:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:321:9: error:
no member named 'isinf' in the global namespace
using ::isinf;
~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:322:9: error:
no member named 'isnan' in the global namespace
using ::isnan;
~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:323:9: error:
no member named 'isnormal' in the global namespace
using ::isnormal;
~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:324:7: error:
no member named 'isgreater' in the global namespace; did you mean
'::std::greater'?
using ::isgreater;
^~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/functional:728:29: note:
'::std::greater' declared here
struct _LIBCPP_TEMPLATE_VIS greater : binary_function<_Tp, _Tp, bool>
^
In file included from /Users/risner/src/afsctool/src/ParallelProcess.cpp:18:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:325:7: error:
no member named 'isgreaterequal' in the global namespace; did you mean
'::std::greater_equal'?
using ::isgreaterequal;
^~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/functional:757:29: note:
'::std::greater_equal' declared here
struct _LIBCPP_TEMPLATE_VIS greater_equal : binary_function<_Tp, _Tp, bool>
^
In file included from /Users/risner/src/afsctool/src/ParallelProcess.cpp:18:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:326:9: error:
no member named 'isless' in the global namespace
using ::isless;
~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:327:9: error:
no member named 'islessequal' in the global namespace
using ::islessequal;
~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:328:9: error:
no member named 'islessgreater' in the global namespace
using ::islessgreater;
~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:329:9: error:
no member named 'isunordered' in the global namespace
using ::isunordered;
~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:330:9: error:
no member named 'isunordered' in the global namespace
using ::isunordered;
~~^
In file included from /Users/risner/src/afsctool/src/ParallelProcess.cpp:20:
In file included from /Users/risner/src/afsctool/src/ParallelProcess_p.hpp:19:
In file included from /Users/risner/src/afsctool/src/Thread/Thread.hpp:14:
In file included from /Users/risner/src/afsctool/src/CritSectEx/CritSectEx.h:43:
In file included from /Users/risner/src/afsctool/src/CritSectEx/msemul.h:55:
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/signal.h:69:21: warning:
pointer is missing a nullability type specifier (_Nonnull, _Nullable, or
_Null_unspecified) [-Wnullability-completeness]
extern __const char *__const sys_signame[NSIG];
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/signal.h:69:21: note:
insert '_Nullable' if the pointer may be null
extern __const char *__const sys_signame[NSIG];
^
_Nullable
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/signal.h:69:21: note:
insert '_Nonnull' if the pointer should never be null
extern __const char *__const sys_signame[NSIG];
^
_Nonnull
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/signal.h:82:18: warning:
pointer is missing a nullability type specifier (_Nonnull, _Nullable, or
_Null_unspecified) [-Wnullability-completeness]
int pthread_kill(pthread_t, int);
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/signal.h:82:18: note:
insert '_Nullable' if the pointer may be null
int pthread_kill(pthread_t, int);
^
_Nullable
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/signal.h:82:18: note:
insert '_Nonnull' if the pointer should never be null
int pthread_kill(pthread_t, int);
^
_Nonnull
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/signal.h:83:41: warning:
pointer is missing a nullability type specifier (_Nonnull, _Nullable, or
_Null_unspecified) [-Wnullability-completeness]
int pthread_sigmask(int, const sigset_t *, sigset_t *) __DARWIN_ALIA...
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/signal.h:83:41: note:
insert '_Nullable' if the pointer may be null
int pthread_sigmask(int, const sigset_t *, sigset_t *) __DARWIN_ALIA...
^
_Nullable
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/signal.h:83:41: note:
insert '_Nonnull' if the pointer should never be null
int pthread_sigmask(int, const sigset_t *, sigset_t *) __DARWIN_ALIA...
^
_Nonnull
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/signal.h:83:53: warning:
pointer is missing a nullability type specifier (_Nonnull, _Nullable, or
_Null_unspecified) [-Wnullability-completeness]
int pthread_sigmask(int, const sigset_t *, sigset_t *) __DARWIN_ALIA...
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/signal.h:83:53: note:
insert '_Nullable' if the pointer may be null
int pthread_sigmask(int, const sigset_t *, sigset_t *) __DARWIN_ALIA...
^
_Nullable
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/signal.h:83:53: note:
insert '_Nonnull' if the pointer should never be null
int pthread_sigmask(int, const sigset_t *, sigset_t *) __DARWIN_ALIA...
^
_Nonnull
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/signal.h:84:43: warning:
pointer is missing a nullability type specifier (_Nonnull, _Nullable, or
_Null_unspecified) [-Wnullability-completeness]
int sigaction(int, const struct sigaction * __restrict,
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/signal.h:84:43: note:
insert '_Nullable' if the pointer may be null
int sigaction(int, const struct sigaction * __restrict,
^
_Nullable
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/signal.h:84:43: note:
insert '_Nonnull' if the pointer should never be null
int sigaction(int, const struct sigaction * __restrict,
^
_Nonnull
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/signal.h:85:23: warning:
pointer is missing a nullability type specifier (_Nonnull, _Nullable, or
_Null_unspecified) [-Wnullability-completeness]
struct sigaction * __restrict);
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/signal.h:85:23: note:
insert '_Nullable' if the pointer may be null
struct sigaction * __restrict);
^
_Nullable
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/signal.h:85:23: note:
insert '_Nonnull' if the pointer should never be null
struct sigaction * __restrict);
^
_Nonnull
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/signal.h:86:24: warning:
pointer is missing a nullability type specifier (_Nonnull, _Nullable, or
_Null_unspecified) [-Wnullability-completeness]
int sigaddset(sigset_t *, int);
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/signal.h:86:24: note:
insert '_Nullable' if the pointer may be null
int sigaddset(sigset_t *, int);
^
_Nullable
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/signal.h:86:24: note:
insert '_Nonnull' if the pointer should never be null
int sigaddset(sigset_t *, int);
^
_Nonnull
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/signal.h:87:31: warning:
pointer is missing a nullability type specifier (_Nonnull, _Nullable, or
_Null_unspecified) [-Wnullability-completeness]
int sigaltstack(const stack_t * __restrict, stack_t * __restrict) _...
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/signal.h:87:31: note:
insert '_Nullable' if the pointer may be null
int sigaltstack(const stack_t * __restrict, stack_t * __restrict) _...
^
_Nullable
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/signal.h:87:31: note:
insert '_Nonnull' if the pointer should never be null
int sigaltstack(const stack_t * __restrict, stack_t * __restrict) _...
^
_Nonnull
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/signal.h:87:53: warning:
pointer is missing a nullability type specifier (_Nonnull, _Nullable, or
_Null_unspecified) [-Wnullability-completeness]
int sigaltstack(const stack_t * __restrict, stack_t * __restrict) _...
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/signal.h:87:53: note:
insert '_Nullable' if the pointer may be null
int sigaltstack(const stack_t * __restrict, stack_t * __restrict) _DARWIN...
^
_Nullable
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/signal.h:87:53: note:
insert '_Nonnull' if the pointer should never be null
int sigaltstack(const stack_t * __restrict, stack_t * __restrict) _DARWIN...
^
_Nonnull
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/signal.h:88:24: warning:
pointer is missing a nullability type specifier (_Nonnull, _Nullable, or
_Null_unspecified) [-Wnullability-completeness]
int sigdelset(sigset_t *, int);
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/signal.h:88:24: note:
insert '_Nullable' if the pointer may be null
int sigdelset(sigset_t *, int);
^
_Nullable
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/signal.h:88:24: note:
insert '_Nonnull' if the pointer should never be null
int sigdelset(sigset_t *, int);
^
_Nonnull
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/signal.h:89:26: warning:
pointer is missing a nullability type specifier (_Nonnull, _Nullable, or
_Null_unspecified) [-Wnullability-completeness]
int sigemptyset(sigset_t *);
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/signal.h:89:26: note:
insert '_Nullable' if the pointer may be null
int sigemptyset(sigset_t *);
^
_Nullable
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/signal.h:89:26: note:
insert '_Nonnull' if the pointer should never be null
int sigemptyset(sigset_t *);
^
_Nonnull
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/signal.h:90:25: warning:
pointer is missing a nullability type specifier (_Nonnull, _Nullable, or
_Null_unspecified) [-Wnullability-completeness]
int sigfillset(sigset_t *);
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/signal.h:90:25: note:
insert '_Nullable' if the pointer may be null
int sigfillset(sigset_t *);
^
_Nullable
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/signal.h:90:25: note:
insert '_Nonnull' if the pointer should never be null
int sigfillset(sigset_t *);
^
_Nonnull
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/signal.h:94:32: warning:
pointer is missing a nullability type specifier (_Nonnull, _Nullable, or
_Null_unspecified) [-Wnullability-completeness]
int sigismember(const sigset_t *, int);
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/signal.h:94:32: note:
insert '_Nullable' if the pointer may be null
int sigismember(const sigset_t *, int);
^
_Nullable
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/signal.h:94:32: note:
insert '_Nonnull' if the pointer should never be null
int sigismember(const sigset_t *, int);
^
_Nonnull
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/signal.h:96:25: warning:
pointer is missing a nullability type specifier (_Nonnull, _Nullable, or
_Null_unspecified) [-Wnullability-completeness]
int sigpending(sigset_t *);
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/signal.h:96:25: note:
insert '_Nullable' if the pointer may be null
int sigpending(sigset_t *);
^
_Nullable
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/signal.h:96:25: note:
insert '_Nonnull' if the pointer should never be null
int sigpending(sigset_t *);
^
_Nonnull
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/signal.h:97:37: warning:
pointer is missing a nullability type specifier (_Nonnull, _Nullable, or
_Null_unspecified) [-Wnullability-completeness]
int sigprocmask(int, const sigset_t * __restrict, sigset_t * __restrict);
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/signal.h:97:37: note:
insert '_Nullable' if the pointer may be null
int sigprocmask(int, const sigset_t * __restrict, sigset_t * __restrict);
^
_Nullable
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/signal.h:97:37: note:
insert '_Nonnull' if the pointer should never be null
int sigprocmask(int, const sigset_t * __restrict, sigset_t * __restrict);
^
_Nonnull
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/signal.h:97:60: warning:
pointer is missing a nullability type specifier (_Nonnull, _Nullable, or
_Null_unspecified) [-Wnullability-completeness]
int sigprocmask(int, const sigset_t * __restrict, sigset_t * __restrict);
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/signal.h:97:60: note:
insert '_Nullable' if the pointer may be null
int sigprocmask(int, const sigset_t * __restrict, sigset_t * __restrict);
^
_Nullable
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/signal.h:97:60: note:
insert '_Nonnull' if the pointer should never be null
int sigprocmask(int, const sigset_t * __restrict, sigset_t * __restrict);
^
_Nonnull
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/signal.h:100:31: warning:
pointer is missing a nullability type specifier (_Nonnull, _Nullable, or
_Null_unspecified) [-Wnullability-completeness]
int sigsuspend(const sigset_t *) __DARWIN_ALIAS_C(sigsuspend);
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/signal.h:100:31: note:
insert '_Nullable' if the pointer may be null
int sigsuspend(const sigset_t *) __DARWIN_ALIAS_C(sigsuspend);
^
_Nullable
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/signal.h:100:31: note:
insert '_Nonnull' if the pointer should never be null
int sigsuspend(const sigset_t *) __DARWIN_ALIAS_C(sigsuspend);
^
_Nonnull
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/signal.h:101:28: warning:
pointer is missing a nullability type specifier (_Nonnull, _Nullable, or
_Null_unspecified) [-Wnullability-completeness]
int sigwait(const sigset_t * __restrict, int * __restrict) _DARWIN...
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/signal.h:101:28: note:
insert '_Nullable' if the pointer may be null
int sigwait(const sigset_t * __restrict, int * __restrict) _DARWIN...
^
_Nullable
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/signal.h:101:28: note:
insert '_Nonnull' if the pointer should never be null
int sigwait(const sigset_t * __restrict, int * __restrict) _DARWIN...
^
_Nonnull
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/signal.h:101:46: warning:
pointer is missing a nullability type specifier (_Nonnull, _Nullable, or
_Null_unspecified) [-Wnullability-completeness]
int sigwait(const sigset_t * __restrict, int * __restrict) _DARWIN...
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/signal.h:101:46: note:
insert '_Nullable' if the pointer may be null
int sigwait(const sigset_t * __restrict, int * __restrict) _DARWIN...
^
_Nullable
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/signal.h:101:46: note:
insert '_Nonnull' if the pointer should never be null
int sigwait(const sigset_t * __restrict, int * __restrict) _DARWIN...
^
_Nonnull
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/signal.h:103:39: warning:
pointer is missing a nullability type specifier (_Nonnull, _Nullable, or
_Null_unspecified) [-Wnullability-completeness]
void psignal(unsigned int, const char *);
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/signal.h:103:39: note:
insert '_Nullable' if the pointer may be null
void psignal(unsigned int, const char *);
^
_Nullable
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/signal.h:103:39: note:
insert '_Nonnull' if the pointer should never be null
void psignal(unsigned int, const char *);
^
_Nonnull
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/signal.h:106:31: warning:
pointer is missing a nullability type specifier (_Nonnull, _Nullable, or
_Null_unspecified) [-Wnullability-completeness]
int sigvec(int, struct sigvec *, struct sigvec *);
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/signal.h:106:31: note:
insert '_Nullable' if the pointer may be null
int sigvec(int, struct sigvec *, struct sigvec *);
^
_Nullable
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/signal.h:106:31: note:
insert '_Nonnull' if the pointer should never be null
int sigvec(int, struct sigvec *, struct sigvec *);
^
_Nonnull
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/signal.h:106:48: warning:
pointer is missing a nullability type specifier (_Nonnull, _Nullable, or
_Null_unspecified) [-Wnullability-completeness]
int sigvec(int, struct sigvec *, struct sigvec *);
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/signal.h:106:48: note:
insert '_Nullable' if the pointer may be null
int sigvec(int, struct sigvec *, struct sigvec *);
^
_Nullable
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/signal.h:106:48: note:
insert '_Nonnull' if the pointer should never be null
int sigvec(int, struct sigvec *, struct sigvec *);
^
_Nonnull
22 warnings and 13 errors generated.
make[2]: *** [CMakeFiles/PP.dir/src/ParallelProcess.cpp.o] Error 1
make[1]: *** [CMakeFiles/PP.dir/all] Error 2
make: *** [all] Error 2

Support for big files

$ afsctool -c somebigfile
Skipping file somebigfile with unsupportable size 6678124800
Unable to compress file.

Does your afsctool support APFS?

I wanted to know if your tool supports APFS. Sorry to create an issue for this question, but I didn't want to format a 64TB RAID6 array as APFS and then find out I cannot compress files on it.

Incorrect license

The project currently lists two licenses, but doesn't look like it can be distributed under either.
Specifically there's GPL3 (https://github.com/RJVB/afsctool/blob/master/License.txt) and BSL (https://github.com/RJVB/afsctool/blob/master/LICENSE_1_0.txt) but one of the files is just proprietary:

* This code is made available under No License At All

Was the intention to place it in a public domain instead? There are licenses made for that purpose https://en.wikipedia.org/wiki/Public-domain-equivalent_license or you could explicitly say that the source is placed in public domain. Otherwise no license effectively makes the code proprietary and not free to use.

Is this afsctool the clear successor to the original? Should the homebrew afsctool formula point here instead?

The original v1.6.4 afsctool from brkirch seems abandoned but it's still the version that Homebrew's afsctool formula installs. See here: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/afsctool.rb. The formula even applies 2 patches to the old code so that it will compile on recent macOS.

Is this fork the clear de-facto successor? Would every, or nearly every, Homebrew user of afsctool v1.6.4 just be happier with this fork instead? I suspect so, but am honestly not sure! All I'm really asking is does @RJVB think this is a good idea?

If this sounds good, then I'm volunteering myself to embark on a quest to try and get the Homebrew formula updated.

Linking error with latest source

Any thoughts appreciated.

[100%] Linking CXX executable afsctool
ld: warning: directory not found for option '-L-lz'
ld: warning: text-based stub file /System/Library/Frameworks//CoreServices.framework/CoreServices.tbd and library file /System/Library/Frameworks//CoreServices.framework/CoreServices are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//CFNetwork.framework/Versions/A/CFNetwork.tbd and library file /System/Library/Frameworks//CFNetwork.framework/Versions/A/CFNetwork are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSServices.framework/Versions/A/OSServices.tbd and library file /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSServices.framework/Versions/A/OSServices are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//CoreFoundation.framework/Versions/A/CoreFoundation.tbd and library file /System/Library/Frameworks//CoreFoundation.framework/Versions/A/CoreFoundation are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/LaunchServices.tbd and library file /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/LaunchServices are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SharedFileList.framework/Versions/A/SharedFileList.tbd and library file /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SharedFileList.framework/Versions/A/SharedFileList are out of sync. Falling back to library file for linking.
Undefined symbols for architecture x86_64:
  "_compress2", referenced from:
      _compressFile in afsctool.c.o
  "_compressBound", referenced from:
      _compressFile in afsctool.c.o
  "_uncompress", referenced from:
      _decompressFile in afsctool.c.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [afsctool] Error 1
make[1]: *** [CMakeFiles/afsctool.dir/all] Error 2
make: *** [all] Error 2

"0 byte" files after specifying the same directory twice

Hi! I found afsctool yesterday and generally it works great! Thanks for keeping it alive!
Because it's so useful I tried to make it into an Automator service to be available from Finder's contextual menu. Unfortunately I fucked it up a bit:
automator
The Get Selected Finder Items action (which I put there for making testing services easier, suggested by Automator itself) is unnecessary, because it adds the very same items to the argument list twice.

This way the command that actually got executed was the following (fortunately I used a non-important directory):
afsctool -cvvv -9 -J8 ~/.cache ~/.cache
I had to manually kill afsctool because it never finished. And when I looked into the given directory, it had many apparently "Zero bytes" sized files according to the Finder. Examining them with xattr, they still had a non-empty com.apple.decmpfs attribute, so I guess the data was still there in them, but afsctool attempted to concurrently process them:

xattr -l ~/.cache2/fontconfig/<random chars>.cache-4 
com.apple.decmpfs:
00000000  66 70 6D 63 03 00 00 00 C8 1B 00 00 00 00 00 00  |fpmc............|

Suggestion:
I have no clue how to work with files atomically, so to make attempted concurrent processing safer, it could be useful to rename files before processing then renaming back when compression is done. Maybe a similar naming template could be used:
original-file.txt-afsc-<process id>-<thread number>-<per thread incrementing number>-<and maybe a random number too>

There also could be a new command line argument to scan and find all files having temporary names and attempting repairing them.

Thank you!

Compression and APFS

Will this tool work on High Sierra with APFS volumes?

Are there any known problems with converting a HFS+ volume containing compressed files (compressed using afsctool) tp APFS? Is it safe to upgrade to High Sierra if we have HFS+ compressed file?

"File is already HFS+/APFS compressed."

When compressing previously uncompressed file, I get message that it is already compressed:

$ unpigz 10.215.110.178-bx.gz

<130> [3] 16:24 /Users/sergei/artifacts/
$ afsctool -v 10.215.110.178-bx10.215.110.170-bx
/Users/sergei/amazon/artifacts/gameday/10.215.110.178-bx:
File is not HFS+/APFS compressed.
File content type: dyn.ah62d4rv4ge8xcr32fzvhu
File data fork size (reported size by Mac OS X Finder): 950219014 bytes / 950.2 MB (megabytes, base-10)
Number of extended attributes: 0
Total size of extended attribute data: 0 bytes
Approximate total file size (data fork + resource fork + EA + EA overhead + file overhead): 950222848 bytes / 906.2 MiB

[3] 16:24 /Users/sergei/artifacts/
$ afsctool -c 10.215.110.178-bx
File is already HFS+/APFS compressed.

[3] 16:25 /Users/sergei/artifacts/
$ afsctool -v 10.215.110.178-bx
/Users/sergei/amazon/artifacts/gameday/10.215.110.178-bx:
File is HFS+/APFS compressed.
Compression type: ZLIB in resource fork (4)
File content type: dyn.ah62d4rv4ge8xcr32fzvhu
File size (uncompressed; reported size by Mac OS 10.6+ Finder): 950219014 bytes / 950.2 MB (megabytes, base-10)
File size (compressed): 67719168 bytes / 64.6 MiB
Compression savings: 92.9%
Number of extended attributes: 0
Total size of extended attribute data: 0 bytes
Uncompressed file size reported in compressed header: 950219014 bytes

Unable to build when the path to Xcode contains spaces

Not sure if I this a Xcode bug or AFSC-tool one, but when I try to run cmake, while having installed Xcode to /custom location/ instead of /Apps I get the following error:

-- Check for working C compiler: /usr/bin/cc - broken
CMake Error at /usr/local/Cellar/cmake/3.22.2/share/cmake/Modules/CMakeTestCCompiler.cmake:69 (message):
  The C compiler

    "/usr/bin/cc"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: /Users/tmw/Downloads/afsctool/CMakeFiles/CMakeTmp
    
    Run Build Command(s):/usr/bin/make -f Makefile cmTC_3466d/fast && /custom location/Xcode.app/Contents/Developer/usr/bin/make  -f CMakeFiles/cmTC_3466d.dir/build.make CMakeFiles/cmTC_3466d.dir/build
    make: /custom: No such file or directory
    make: *** [cmTC_3466d/fast] Error 1
    
    

  

  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:3 (project)


-- Configuring incomplete, errors occurred!

Kernel panic on huge files?

Just for reference, if it happens to other people:

I ran afsctool on directories having some few GB files using the following command (if I understand, it works in single-threaded mode):
afsctool -cvvv -9 -L …/folders/at/wherever

When processing the huge files, memory compression and swapfile usage went up quite extremely, but of course it's expected. The unexpected thing is the kernel panic. It happened twice so far. I have no clue if the error happened in 's memory compression or the file compression part.

Panic happens here (just for fun):
https://opensource.apple.com/source/xnu/xnu-4570.71.2/osfmk/vm/vm_fault.c.auto.html

if ((map == kernel_map) && (caller_prot & VM_PROT_WRITE)) {
	if (compressor_map) {
		if ((vaddr >= vm_map_min(compressor_map)) && (vaddr < vm_map_max(compressor_map))) {
			panic("Write fault on compressor map, va: %p type: %u bounds: %p->%p", (void *) vaddr, caller_prot, (void *) vm_map_min(compressor_map), (void *) vm_map_max(compressor_map));

Shortened panic report:

*** Panic Report ***
panic(cpu 0 caller 0xffffff80274ed17b): "Write fault on compressor map, va: 0xffffff9128ce8000 type: 3 bounds: 0xffffff821247d000->0xffffff92126bd000"@/BuildRoot/Library/Caches/com.apple.xbs/Sources/xnu/xnu-4570.71.45/osfmk/vm/vm_fault.c:3523
Backtrace (CPU 0), Frame : Return Address
0xffffff803aa03170 : 0xffffff802746bf96

0xffffff803aa03fa0 : 0xffffff802741dec2
Kernel Extensions in backtrace:
com.apple.filesystems.hfs.kext(407.50.6)[…]@0xffffff7fa9b3a000->0xffffff7fa9ba0fff
dependency: com.apple.filesystems.hfs.encodings.kext(1)[…]@0xffffff7fa9b32000
com.apple.AppleFSCompression.AppleFSCompressionTypeZlib(1.0)[…]@0xffffff7faa77c000->0xffffff7faa788fff

BSD process name corresponding to current thread: afsctool

Mac OS version:
17G7024 /// == High Sierra 10.13.6
Kernel version:
Darwin Kernel Version 17.7.0: Wed Apr 24 21:17:24 PDT 2019; root:xnu-4570.71.45~1/RELEASE_X86_64

Model: Macmini6,2, BootROM 278.0.0.0.0, 4 processors, Intel Core i7, 2.3 GHz, 16 GB, SMC 2.8f1

Building latest source... fatal error: 'FastCompression.h' file not found

Salut mec,

Building latest source...

CMakeLists.txt says:

if(APPLE)
    find_file(LZVN_HEADER "FastCompression.h")
    find_library(LZVN_LIBRARY "FastCompression")
    message(STATUS "LZVN_HEADER,LIB: ${LZVN_HEADER} ${LZVN_LIBRARY}")
    include_directories(${ZLIBP_INCLUDE_DIR})
endif()

This works and during cmake I see:

-- LZVN_HEADER,LIB: /usr/local/include/FastCompression.h /usr/local/lib/libFastCompression.dylib
-- Enabling LZVN support

But during make I see:

Scanning dependencies of target afsctool
[ 81%] Building C object CMakeFiles/afsctool.dir/src/afsctool.c.o
/Users/matt/Projects/afsctool/src/afsctool.c:27:11: fatal error: 'FastCompression.h' file
      not found
#       include <FastCompression.h>
                ^~~~~~~~~~~~~~~~~~~
1 error generated.

So, I have to manually change:

#ifdef HAS_LZVN
#	include <FastCompression.h>
#endif

To this:

#ifdef HAS_LZVN
#	include </usr/local/include/FastCompression.h>
#endif

Not sure if there's a better way to do this using CMake/make?

Cheers!

0 byte files after running afsctool (1.7/1.6.9 with LZVN & zlib support)

Hello,
first – thanks for the updated tool, was always hoping someone could improve the archived version!

System Info: macOS 10.12.6 with both HFS and APFS disks. Boot volume is of course HFS. Two internal SSDs with Mojave in APFS.
cmake: stable 3.11.4
GNU Make 3.81
zlib: stable 1.2.11 (PKG_CONFIG_PATH: /usr/local/opt/zlib/lib/pkgconfig)
LZVN from here: https://github.com/RJVB/LZVN
XCode 9.2 and Command Line Tools for 9.2

I've compiled the latest version (1.7/1.6.9) with ZLIB and LZVN support and have run several tests with different settings, but always encounter the same problem: When i try to compress an uncompressed (or previously compressed [w afsctool from brew]) folder a lot of files end up showing only 0 bytes in Finder (and Terminal). If if try to open that "empty" file the content is not accessible – the default App/software for that file extension throws an error message. It's also impossible to decompress the 0 byte files – after decompression they remain at 0 bytes. This occurs on both HFS and APFS volumes, i've tested it with several different folder and subfolder structures containing various file types. It is not restricted to certain file types or files that have anything in common. I just wanted to pin the problem down to certain file names / too many subfolders – but i could not find a pattern. The only thing that is constant: It always happens to the same files within that folder – regardless of the file name, extension or my input options.

Have also tried older versions (from the "Tags" menu), but couldn't find one that does not cause this issue. Tried to find an error while building from source, but everything looks fine – the source files seem to be OK.

I've tried running it with the ZLIB and LZVN option, with just one or 4-8 worker(s) and several other different input options, but the result is always the same. When i try to compress a large folder with several subfolders a lot of files have 0 bytes afterwards and end up being corrupted.

For now i've reverted to the brew build (afsctool 1.6.4 build 34) and have tested compressing the same folders with different options and don't run into this issue. Would really love to use your updated version though – without destroying the content of my files :-)

Are there any arguments i should add that could prevent this? Have other users also experienced this issue?

Suggestion of a new fork at Homebrew

As per @brkirch comment at Homebrew/homebrew-core#20898 (comment):

Any fork with major changes can have a formula submitted under a different program name, and I don't mind at all if "afsctool" is included in the name so long as it isn't the full name.

The enhancements in https://github.com/RJVB/afsctool do look nice so if @RJVB doesn't mind then it doesn't seem like a bad idea to submit a formula for it under a different name. Like I said in my above comment, it would be fine if afsctool is included in the name (e.g. afsctool_rjvb).

Process stuck waiting

So, running the application in small batches works, but when I try to do a large directory, the process waits. Pressing CTRL + T shows this.

load: 3.16 cmd: afsctool 12486 waiting 52.97u 10.25s

Running dtruss reveals

psynch_cvwait(0x600000E1D2A0, 0x9C0100009D00, 0x0) = -1 Err#316 gettimeofday(0x7FF7B6CBA018, 0x0, 0x0) = 0 0

Now, I'm no programmer, so I don't really understand what is going on. Please advise if there is a better way I can create more useful output for diagnosis.

Problem with filename/path containing punctuation

I was compressing some odd files, and there was this error:

/Users/matt/Downloads/1234_Years/2018/2018-06/2018-06-16/PSX ISOs/_Table Games/Hanafuda/BIN/Nice Price Series Vol. 03 - Hanafuda : No such file or directory

It was a file, and it is there, so I am thinking that perhaps some punctuation is the problem?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.