[kaze@kaze ~]$ su
[root@kaze kaze]# swapon
NAME       TYPE        SIZE USED PRIO
/dev/sdb2  partition 128.8G   0B   -2
/dev/zram0 partition  70.3G   0B  100
[root@kaze kaze]# cat /proc/sys/vm/swappiness
95
[root@kaze kaze]# exit
exit
[kaze@kaze ~]$ cd Desktop/
[kaze@kaze Desktop]$ cd TEXTUAL_MADNESS_bare-minimum_2021_Mar_12/
[kaze@kaze TEXTUAL_MADNESS_bare-minimum_2021_Mar_12]$ cd Nakamichi_2021-Mar-12/
[kaze@kaze Nakamichi_2021-Mar-12]$ ls -l
total 3488132
-rw-r--r--. 1 kaze kaze        114 Mar 13 17:29  BZIP2ify.sh
-rw-r--r--. 1 kaze kaze      46829 Mar 13 21:18  Compressionette.txt
-rwxrwxrwx. 1 kaze kaze  100000000 Mar 28  2019  enwik8
-rwxrwxrwx. 1 kaze kaze   29008758 Mar 28  2019  enwik8.bz2
-rwxrwxrwx. 1 kaze kaze   25328049 Mar 28  2019  enwik8.L22W2GB.zst
-rw-rw-r--. 1 kaze kaze   33070642 Mar 13 20:16  enwik8.Nakamichi
-rw-rw-r--. 1 kaze kaze  100000000 Mar 13 20:16  enwik8.NKMCH
-rwxr-xr-x. 1 kaze kaze  226877440 Jan 25 09:28  glibc-2.32.tar
-rwxr-xr-x. 1 kaze kaze   23982240 Jan 25 09:28  glibc-2.32.tar.bz2
-rw-r--r--. 1 kaze kaze      55397 Mar 13 06:17  lzsse2.cpp
-rw-r--r--. 1 kaze kaze       4858 Mar 13 06:17  lzsse2.h
-rw-r--r--. 1 kaze kaze       2481 Mar 13 06:17  lzsse2_platform.h
-rw-r--r--. 1 kaze kaze      71964 Mar 13 06:17  LZSS-master.zip
-rw-r--r--. 1 kaze kaze       2137 Mar 13 06:17  _MakeELF_Nakamichi_GCC.sh
-rw-r--r--. 1 kaze kaze       2428 Mar 13 06:17  _MakeEXE_Nakamichi_GCC.bat
-rw-r--r--. 1 kaze kaze       3010 Mar 13 06:17  _MakeEXE_Nakamichi_ICL.bat
-rw-r--r--. 1 kaze kaze       1633 Mar 13 06:17 'MokujIN Amber 217 prompt.lnk'
-rw-r--r--. 1 kaze kaze      75776 Mar 13 06:17  Nakamichi_DD-192_32bit.exe
-rw-r--r--. 1 kaze kaze      83968 Mar 13 06:17  Nakamichi_DD-192_64bit.exe
-rwxrwxr-x. 1 kaze kaze     857952 Mar 13 17:51  Nakamichi_DD-192.elf
-rwxrwxr-x. 1 kaze kaze     142336 Mar 13 17:51  Nakamichi_DD-192.exe
-rw-r--r--. 1 kaze kaze        559 Mar 13 06:17  Nakamichify_external-128GB.bat
-rw-r--r--. 1 kaze kaze        498 Mar 13 06:17  Nakamichify_internal-128GB.bat
-rw-r--r--. 1 kaze kaze        344 Mar 13 06:17  Nakamichify_internal-128GB.sh
-rw-r--r--. 1 kaze kaze        344 Mar 13 06:17  Nakamichify_internal-1TB.sh
-rw-r--r--. 1 kaze kaze        345 Mar 13 06:17  Nakamichify_internal-2TB.sh
-rwxrwxr-x. 1 kaze kaze     857952 Mar 13 17:51  Nakamichi_PRV-192.elf
-rwxrwxr-x. 1 kaze kaze     143360 Mar 13 17:51  Nakamichi_PRV-192.exe
-rw-rw-r--. 1 kaze kaze       7703 Mar 13 20:48  Nakamichi.ratio-graph.csv
-rw-r--r--. 1 kaze kaze    1490807 Mar 13 06:17  Nakamichi_Ryuugan-ditto-1TB_btree.c
-rwxrwxr-x. 1 kaze kaze     857952 Mar 13 17:51  Nakamichi_SHA3-192.elf
-rwxrwxr-x. 1 kaze kaze     142336 Mar 13 17:51  Nakamichi_SHA3-192.exe
-rw-r--r--. 1 kaze kaze       3485 Mar 13 06:17  prvhash42.h
-rw-r--r--. 1 kaze kaze      49152 Mar 13 06:17  sha1sum.exe
-rw-rw-r--. 1 kaze kaze  832290816 Mar 13 17:50 'SUPRAPIG_book_serie_SPETSNAZ_(981_UTF-8_novels_Russian).tar'
-rwxr-xr-x. 1 kaze kaze  135202557 Jan  1 20:54 'SUPRAPIG_book_serie_SPETSNAZ_(981_UTF-8_novels_Russian).tar.Nakamichi'
-rw-rw-r--. 1 kaze kaze  524794368 Mar 13 17:49 'SUPRAPIG_The_Prague_Stringology_Club_(302-PostScript-files).tar'
-rwxr-xr-x. 1 kaze kaze  101783595 Jan 15 16:30 'SUPRAPIG_The_Prague_Stringology_Club_(302-PostScript-files).tar.Nakamichi'
-rw-rw-r--. 1 kaze kaze 1434503938 Mar 13 21:15 'SUPRAPIG_The_Prague_Stringology_Club_(302-PostScript-files).tar.NKMCH'
-rw-r--r--. 1 kaze kaze       6144 Mar 13 06:17  timer64.exe
-rw-r--r--. 1 kaze kaze        241 Mar 13 06:17  ZSTDify.sh
[kaze@kaze Nakamichi_2021-Mar-12]$ sh Nakamichify_internal-128GB.sh SUPRAPIG_The_Prague_Stringology_Club_\(302-PostScript-files\).tar
79b9c48428daa2c7bd606df7f139423bd2c9c7d2  SUPRAPIG_The_Prague_Stringology_Club_(302-PostScript-files).tar
                                                                                                                                                                 
                                                            SMMi                                                                               :MM2              
                                                           0MMMMM:                                                                            rMMMMMa            
                                                          ZMMM. 0Z                                                                           :MMM7 7B            
                                                         rMM@                                                                                MMM                 
         7                                               MMM                                                                                MMM.                 
       BMMMa XZ               :MM:                      MMM                                                                                XMMX                  
     XMSANMAYCE;             rMMMM                     rMM;                                                                                MM@                   
    WM0  2MMMMM             ZMMMM                      MMW                                                                                BMM                    
    :      MMMB           aMMMMW                      2MM                                                           :MM8                  MM7               8MMi 
            MMMZ           XMMM                       MMa                                                         .WMMM0                 @MM              rMMMMi 
            MMMMa           MM,                      aMM                                                          XMMB                   MM:              MMM2   
           @MXMMM7         0MM                       MMS                                                                                WMM                      
           MM  MMM,        MM7                      7MM                                                                                 MM:                      
          MMX  ;MMM       iMM         MMM8  .       MM8     MMS         MMMZ  .     iMBi    :MMMX      @MMa      WB:       XMMZ2aX     ZMM     MMM2     :M2      
         :MM    ZMMM      BM8       ;MMMMMaaMM     ,MM    XMM@MM      rMMMMM2aMM   XMMMM   SMMSMM.    MMXMMM    MMMM0     aMMMa@MMr    MMS   ;MM;MM8   XMMMM.    
         MMr     MMM0     MM       2MMW    MMM     0MM   ZMS 2MM.    aMMB    MMM  BM aMM  8Ma  MM   iMM  BMM   M7 MMZ    ;MMX   MMi   ;MM   ZMW  MM0  rM 7MM     
        ;MM       MMM7   iMM      ZMM2    0MMa     MMX  8M:  MMM    ZMMS    BMM2  7  MM8 ZMr  :MM  rMB   MM@     iMM     MMZ   iMM    WMW  BM2   MMX     @MM     
        MMi       ;MMM   0MS     2MM7    aMMM     ;MM .8Mi  MMM    aMM7    ZMMM      MM ;Mr   XMM iM8    MMa     0MM    BMM    MMM    MM: BMX   .MM      MM7     
       aMM         BMMM  MM     ;MMX    ZMMMZ     BM@ MMM    .    rMM7    ZMMMZ     :MM:MX    0MZ M8    XMM,     MMX    MM.    ;W:   rMM aMX    ZMM     7MM      
       MM           MMMi MM     MMZ    8M:MM      MM; MMM,        MMa    0M:MM      8MWM8     MMZM0     MMM     rMM    0MM           WMa,M2     MMS     MM8      
      @M0           :MMMXMa    MMM    WM XMB ;   :MM;M8MMM       MMM    @M XM0 ;    MMM@      MMMW      MMrZi   MMS    MMi           MMZM0     rMM Mi   MM :     
     ;MM             BMMMM:   rMM    MM  MMSMa   ZMMM@ iMMr     7MM    MM  MMXM2   :MMM      ZMMM      8MM@@    MMZ0  7MM       ,   :MMMM      MMBMa   0MWBr     
    ,MMMM             MMMM    MMS   MM   MMMZ    MMMM   MMM     MMS  .MM   MMMZ    @MM.      MMM       MMMM    WMM@   0MM      2M   ZMMM      :MMMa    MMM7      
  iMMMMMM@            XMMM   .MM  XMM   aMMM     MMM:    MMW   .MM  XM@   ZMMM     MM0      aMMX      8MMM    .MMM    WMM     ZMr   MMMX      MMM8    0MMS       
 SMMMMi                MMM,  rMM,MM2    MMM:    SMMM     ;MM2  ;MM,MMS    MMM,    MMM       MMM       MMM.    MMM     .MM    MMZ    MMM      XMMM    rMMB        
 :MMM7                 MM@    BMMM      aMM     ;MMX      aMMX  8MMM      ZMM     MM8      .MMX      MMM2    iMMX      ,MMMMMMZ     .@;      MMM     WMM         
    .                  .:                         :        0MMZ                                      .2Z                  :7r.                ;i                 
                                                            0MMMaSMi                                                                                             
                                                             aMMMM7                                                                                              
                                                              .WW                                                                                                
                                                                                                                                                                 
Nakamichi 'Ryuugan-ditto-1TB', written by Kaze, inspired by Haruhiko Okumura sharing, based on Nobuo Ito's LZSS source, muffinesque tips by m^2, Jim Dempsey and Kirill Kryukov enforced.
This latest (2021-Mar-12) compile has B-trees only matchfinder - called 'LITE'; Downloadable at: https://twitter.com/Sanmayce

Nakamichi 'Kaidanji' SUPRALITE highlights:

- Back to supersimplisticism - 'Kaidanji' returns refined. Simply, ripping only orders 4..16 and then quickly trying to expand the match in the found position.

Nakamichi 'Ryuugan-ditto-1TB'/'Dragoneye' LITE highlights:

- The Zennish LZSS Microdeduplicator, a texttoy (file-to-file [de]compressor) written in plain C, 100% FREE - licenseless it is;
- Single-threaded Non-SIMD console tool written entirely by yours truly Sanmayce;
- The first Lempel-Ziv-Storer-Szymanski (LZSS) compressor using 1TB sliding window;
- It targets superfast decompression of huge/tera corpora of textual data;

- LITE means no memmem() (Railgun) invocations are to be made, nah, back to minimalistic Railgun since 2021-Mar-12;
- Compressing at Linear Rate due to Matchfinding based on B-trees only;
- The Leprechaunesque (Internal/External) B-trees order 3 (2 keys MAX) are brutally-optimized;

- Ability to deduplicate (as little as) 64 bytes long chunks 1TB backwards;
- Ability to deduplicate 256[+] bytes long chunks 1TB backwards - when SHA3 enabled;

- CHUNKABLE! Since there are no headers/metadata in .Nakamichi files, arbitrary chunks/blocks can be compressed-n-concatenated;

- SCALABLE! Gets faster when more Physical or/and External RAM is available;
- Dynamical (as command line parameters) selection of HASH & B-trees memory blocks;
- AUTO-RESETTING PASSES (when TargetBuffer is filled then automaticaly restart building by doubling the passes);
- DEFRAGMENTED B-trees are in use during compression stage, their leaves contain only BBs appearing 2[+] times;

- Compileable under Windows and Linux, most suitable to run on 3TB machines;
- Many thanks go to: Haruhiko Okumura, Nobuo Ito, Hamid Buzidi, Landon Noll, Aleksey Vaneev (https://github.com/avaneev/prvhash).

Sanmayce, Nakamichi's author, here, some more notes:

- The B-trees form the second layer, the first being HASH table handled by FNV1A-Pippip - the fastest lookup-hash;
- Hashpot a.k.a. hashpools (residing in Physical RAM) could be tuned via command line parameter, thus lessening the B-trees heights;
- The building of B-trees is done dynamically-n-automatically in PASSES, thus LOCALITY/LOCALIZATION leads to cache-friendliness, for example, instead of confusing/blinding
  the SSD controller with building 2^27 ~= 128M B-trees at a time, 'PASSES' revision lowers the "noise/mayhem" 128 times by processing e.g. (20bit) 1M B-trees at a time;

- For so long, the main goal was to throw it in battle, thus to forge one battle-ready *nix/windows tool with superb hash/search/decompress capabilities.
- Straight up, a wish of mine is to have the latest English Wikipedia XML dump decompressed by Nakamichi into physical RAM and then followed by Kazahana's superfast exact/wildcard/fuzzy etudes.
- Through the years, such a transparent decompressor (load booster) has been losing momentum and kinda became unnecessary, but not for me, when HDDs had 40MB/s sequential read speeds it was ...
  boosty, now with SSDs reading at 1700+MB/s, not so smacky, yet uploading (on 128GB machines, 20GB+72GB needed) the whole Wikipedia ~20GB (instead of 72GB) is better, sizewise.

- Currently, having 16 (4,6,8,10,12,14,16,18,36,64,24,28,48,56,128,256) MatchLens being hashed (plus 1 being phantomic/temporary), 29bit hashtable results in: (16+1)*8*(2^29) = (16+1)*8*(1<<29) =
  69632MB hashpot (the cluster of all hashpools), each slot houses a QWORD (being an offset/address of a B-tree root).
- In near future, wanna see a machine (256GB RAM) crunching the 77,265,813,300 bytes file with this command line (it requires 2x72GB + 68GB + 2930GB = 212GB physical RAM + 2.9TB SSD RAM):
  D:\>timer64 Nakamichi.exe enwiki-20200420-pages-articles.xml enwiki-20200420-pages-articles.xml.Nakamichi 29 3000000 e
- In not so far future, wanna see a machine (4096GB RAM) crunching the 72GB file with this command line (it requires 2x72GB + 272GB + 2930GB = 3.3TB physical RAM):
  D:\>timer64 Nakamichi.exe enwiki-20200420-pages-articles.xml enwiki-20200420-pages-articles.xml.Nakamichi 31 3000000 i

Q: - HOW TO BOOST [BUILDING/COMPRESSION] SPEED?
A: - Now, the name of the game is "RAM in spades", if we have a lot then speed is going to jump a lot. How?
- First, by increasing the hash-pool - 20 (number of bits) was used in 'Taishukan' resulting in 2^20 =~ 1M hash-slots a.k.a. B-trees' roots per keysize, naturally, the bigger the faster since B-trees will
  have less height and will be more - aiming to reach the ideal case - having only hash-slots with no actual B-trees! Back to 'Taishukan', the testfile is ~77MB, it suggests using 128M slots to lower 
  height/branching of B-trees - 2^27 leads to using 27. Feartime, going from 20 to 27: 8*(15+1)*2^(20) = 134,217,793 bytes; with the speed-up hash needs 8*(15+1)*2^(27) = 17,179,869,184 bytes, yes 16GB.
- Second, by lowering passes in building the B-trees - the trick is to increase the number in compile-time parameter -DSpeedUpBuilding=32 - (didn't make it as an execute-time parameter, lazy).
  If we look at the 'Taishukan' console log it tells us that (Target-Buffer 106 MB) x 64 passes = 6784MB are needed for building the B-trees in ONE PASS ONLY, so compile with -DSpeedUpBuilding=6784 instead.

Enfun!

This compile uses B-trees only, no memmem() invocations - it compresses worse but much faster.
Allocating Source-Buffer 500 MB ... 
Allocating Target-Buffer 820 MB ... 
Source-file-Hash(FNV1A_YoshimitsuTRIAD) = 0xa5a8,8e5f
Leprechaun: Memory pool for B-trees is 123,000 MB.
Leprechaun: In this revision 512MB 16-way hash is used which results in 16 x 67,108,864 internal B-Trees of order 3.
Leprechaun: Allocating HASH memory 9,126,805,569 bytes = 8*(16+1)*2^(26) ... OK
Leprechaun: Allocating memory for B-trees 123001 MB ... OK
Leprechaun: Size of input file: 524,794,368

Leprechaun: Using (first 24 bytes of) DoubleDeuce (a.k.a. 3x2x4B=24B: 2xCastagnoli, 2xKoopman, 2xKoopman2) for Matches 24+ long, in order to reduce memory footprint.
Leprechaun: Inserting keys/BBs of order 004 into B-trees, free RAM in B-tree pool is 00,123,000 MB; Pass #000,001 of 000,001 ... 
Leprechaun: Failure! Increment 'Memory for B-trees'!
Automatically increasing number of passes in order to fit B-trees into Target Buffer.
Leprechaun: Inserting keys/BBs of order 004 into B-trees, free RAM in B-tree pool is 00,122,812 MB; Pass #000,002 of 000,002 ... DONE; 00,007,816,245 DEFRAGMENTED B-trees have been rooted so far.
            8,308,154 TotalNonUnique (of length 004) keys have been inserted into DEFRAGMENTED B-trees.
Leprechaun: Inserting keys/BBs of order 006 into B-trees, free RAM in B-tree pool is 00,122,625 MB; Pass #000,001 of 000,002 ... 
Leprechaun: Failure! Increment 'Memory for B-trees'!
Automatically increasing number of passes in order to fit B-trees into Target Buffer.
Leprechaun: Inserting keys/BBs of order 006 into B-trees, free RAM in B-tree pool is 00,121,933 MB; Pass #000,004 of 000,004 ... DONE; 00,025,246,349 DEFRAGMENTED B-trees have been rooted so far.
            20,181,897 TotalNonUnique (of length 006) keys have been inserted into DEFRAGMENTED B-trees.
Leprechaun: Inserting keys/BBs of order 008 into B-trees, free RAM in B-tree pool is 00,121,702 MB; Pass #000,001 of 000,004 ... 
Leprechaun: Failure! Increment 'Memory for B-trees'!
Automatically increasing number of passes in order to fit B-trees into Target Buffer.
Leprechaun: Inserting keys/BBs of order 008 into B-trees, free RAM in B-tree pool is 00,120,795 MB; Pass #000,008 of 000,008 ... DONE; 00,043,429,461 DEFRAGMENTED B-trees have been rooted so far.
            21,209,568 TotalNonUnique (of length 008) keys have been inserted into DEFRAGMENTED B-trees.
Leprechaun: Inserting keys/BBs of order 010 into B-trees, free RAM in B-tree pool is 00,119,620 MB; Pass #000,008 of 000,008 ... DONE; 00,062,936,107 DEFRAGMENTED B-trees have been rooted so far.
            23,049,939 TotalNonUnique (of length 010) keys have been inserted into DEFRAGMENTED B-trees.
Leprechaun: Inserting keys/BBs of order 012 into B-trees, free RAM in B-tree pool is 00,118,325 MB; Pass #000,008 of 000,008 ... DONE; 00,082,961,802 DEFRAGMENTED B-trees have been rooted so far.
            23,785,884 TotalNonUnique (of length 012) keys have been inserted into DEFRAGMENTED B-trees.
Leprechaun: Inserting keys/BBs of order 014 into B-trees, free RAM in B-tree pool is 00,116,936 MB; Pass #000,008 of 000,008 ... DONE; 00,103,158,786 DEFRAGMENTED B-trees have been rooted so far.
            24,025,437 TotalNonUnique (of length 014) keys have been inserted into DEFRAGMENTED B-trees.
Leprechaun: Inserting keys/BBs of order 016 into B-trees, free RAM in B-tree pool is 00,116,761 MB; Pass #000,001 of 000,008 ... 
Leprechaun: Failure! Increment 'Memory for B-trees'!
Automatically increasing number of passes in order to fit B-trees into Target Buffer.
Leprechaun: Inserting keys/BBs of order 016 into B-trees, free RAM in B-tree pool is 00,115,384 MB; Pass #000,016 of 000,016 ... DONE; 00,123,198,497 DEFRAGMENTED B-trees have been rooted so far.
            23,807,316 TotalNonUnique (of length 016) keys have been inserted into DEFRAGMENTED B-trees.
Leprechaun: Inserting keys/BBs of order 018 into B-trees, free RAM in B-tree pool is 00,113,854 MB; Pass #000,016 of 000,016 ... DONE; 00,143,071,451 DEFRAGMENTED B-trees have been rooted so far.
            23,567,825 TotalNonUnique (of length 018) keys have been inserted into DEFRAGMENTED B-trees.
Leprechaun: Inserting keys/BBs of order 036 into B-trees, free RAM in B-tree pool is 00,112,091 MB; Pass #000,016 of 000,016 ... DONE; 00,163,040,227 DEFRAGMENTED B-trees have been rooted so far.
            23,699,242 TotalNonUnique (of length 036) keys have been inserted into DEFRAGMENTED B-trees.
Leprechaun: Inserting keys/BBs of order 064 into B-trees, free RAM in B-tree pool is 00,110,227 MB; Pass #000,016 of 000,016 ... DONE; 00,183,932,712 DEFRAGMENTED B-trees have been rooted so far.
            25,031,430 TotalNonUnique (of length 064) keys have been inserted into DEFRAGMENTED B-trees.
Leprechaun: Inserting keys/BBs of order 024 into B-trees, free RAM in B-tree pool is 00,108,482 MB; Pass #000,016 of 000,016 ... DONE; 00,203,457,106 DEFRAGMENTED B-trees have been rooted so far.
            23,082,831 TotalNonUnique (of length 024) keys have been inserted into DEFRAGMENTED B-trees.
Leprechaun: Inserting keys/BBs of order 028 into B-trees, free RAM in B-tree pool is 00,106,736 MB; Pass #000,016 of 000,016 ... DONE; 00,223,087,222 DEFRAGMENTED B-trees have been rooted so far.
            23,219,460 TotalNonUnique (of length 028) keys have been inserted into DEFRAGMENTED B-trees.
Leprechaun: Inserting keys/BBs of order 048 into B-trees, free RAM in B-tree pool is 00,104,914 MB; Pass #000,016 of 000,016 ... DONE; 00,243,548,505 DEFRAGMENTED B-trees have been rooted so far.
            24,408,433 TotalNonUnique (of length 048) keys have been inserted into DEFRAGMENTED B-trees.
Leprechaun: Inserting keys/BBs of order 056 into B-trees, free RAM in B-tree pool is 00,103,064 MB; Pass #000,016 of 000,016 ... DONE; 00,264,265,385 DEFRAGMENTED B-trees have been rooted so far.
            24,776,643 TotalNonUnique (of length 056) keys have been inserted into DEFRAGMENTED B-trees.
Leprechaun: Inserting keys/BBs of order 128 into B-trees, free RAM in B-tree pool is 00,101,150 MB; Pass #000,016 of 000,016 ... DONE; 00,285,660,049 DEFRAGMENTED B-trees have been rooted so far.
            25,764,564 TotalNonUnique (of length 128) keys have been inserted into DEFRAGMENTED B-trees.
Leprechaun: Inserting keys/BBs of order 256 into B-trees, free RAM in B-tree pool is 00,101,030 MB; Pass #000,001 of 000,016 ... 
Leprechaun: Failure! Increment 'Memory for B-trees'!
Automatically increasing number of passes in order to fit B-trees into Target Buffer.
Leprechaun: Inserting keys/BBs of order 256 into B-trees, free RAM in B-tree pool is 00,099,122 MB; Pass #000,032 of 000,032 ... DONE; 00,307,570,380 DEFRAGMENTED B-trees have been rooted so far.
            26,526,835 TotalNonUnique (of length 256) keys have been inserted into DEFRAGMENTED B-trees.

Histogram (rotate it 90 degrees clockwise) of Unique-Building-Blocks appearing 2[+] times (e.g. 'alfalfa-alfa' stream has 1 BB with length 4 appearing 3 times thus adding 1 to the count for {004]):
26,526,835{256]
25,764,564{128]
25,031,430{064]
24,776,643{056]
24,408,433{048]
23,699,242{036]
23,219,460{028]
23,082,831{024]
23,567,825{018]
23,807,316{016]
24,025,437{014]
23,785,884{012]
23,049,939{010]
21,209,568{008]
20,181,897{006]
 8,308,154{004]

Leprechaun: Total Searches-n-Inserts Per Second: 3,392,621 SNIPS = 116,760,468,533 keys in 34,416 seconds
Leprechaun: RAM needed to house B-trees (relative to the file being ripped): 47N = 23,939MB
Leprechaun: RAM needed to build B-trees IN ONE PASS: (Target-Buffer = 820 MB) x 32 passes = 26,240MB
Note: In case of RAM in spades then may use compile option: -DSpeedUpBuilding=26240

Compressing 524,794,368 bytes ...
\; Each rotation means 64KB are encoded; Speed: 0,093,446 B/s; Done 100%; Compression Ratio: 5.45:1; Matches(16/24/48): 761,173/436,030/152,348; 128[+] long matches: 702,610; ETA: 0.00 hours  
NumberOfFullLiterals (lower-the-better): 3629239
RAM-to-RAM performance: 93446 B/s.
Compressed to 96,311,153 bytes.
Source-file-Hash(FNV1A_YoshimitsuTRIAD) = 0xa5a8,8e5f
Target-file-Hash(FNV1A_YoshimitsuTRIAD) = 0xfd87,2fde
	Command being timed: "./Nakamichi_DD-192.elf SUPRAPIG_The_Prague_Stringology_Club_(302-PostScript-files).tar SUPRAPIG_The_Prague_Stringology_Club_(302-PostScript-files).tar.Nakamichi 26 123000 i"
	User time (seconds): 39942.79
	System time (seconds): 18.48
	Percent of CPU this job got: 99%
	Elapsed (wall clock) time (h:mm:ss or m:ss): 11:07:16
	Average shared text size (kbytes): 0
	Average unshared data size (kbytes): 0
	Average stack size (kbytes): 0
	Average total size (kbytes): 0
	Maximum resident set size (kbytes): 34779684
	Average resident set size (kbytes): 0
	Major (requiring I/O) page faults: 464072
	Minor (reclaiming a frame) page faults: 9027458
	Voluntary context switches: 57
	Involuntary context switches: 386042
	Swaps: 0
	File system inputs: 2312
	File system outputs: 188280
	Socket messages sent: 0
	Socket messages received: 0
	Signals delivered: 0
	Page size (bytes): 4096
	Exit status: 0
79b9c48428daa2c7bd606df7f139423bd2c9c7d2  SUPRAPIG_The_Prague_Stringology_Club_(302-PostScript-files).tar.NKMCH
                                                                                                                                                                 
                                                            SMMi                                                                               :MM2              
                                                           0MMMMM:                                                                            rMMMMMa            
                                                          ZMMM. 0Z                                                                           :MMM7 7B            
                                                         rMM@                                                                                MMM                 
         7                                               MMM                                                                                MMM.                 
       BMMMa XZ               :MM:                      MMM                                                                                XMMX                  
     XMSANMAYCE;             rMMMM                     rMM;                                                                                MM@                   
    WM0  2MMMMM             ZMMMM                      MMW                                                                                BMM                    
    :      MMMB           aMMMMW                      2MM                                                           :MM8                  MM7               8MMi 
            MMMZ           XMMM                       MMa                                                         .WMMM0                 @MM              rMMMMi 
            MMMMa           MM,                      aMM                                                          XMMB                   MM:              MMM2   
           @MXMMM7         0MM                       MMS                                                                                WMM                      
           MM  MMM,        MM7                      7MM                                                                                 MM:                      
          MMX  ;MMM       iMM         MMM8  .       MM8     MMS         MMMZ  .     iMBi    :MMMX      @MMa      WB:       XMMZ2aX     ZMM     MMM2     :M2      
         :MM    ZMMM      BM8       ;MMMMMaaMM     ,MM    XMM@MM      rMMMMM2aMM   XMMMM   SMMSMM.    MMXMMM    MMMM0     aMMMa@MMr    MMS   ;MM;MM8   XMMMM.    
         MMr     MMM0     MM       2MMW    MMM     0MM   ZMS 2MM.    aMMB    MMM  BM aMM  8Ma  MM   iMM  BMM   M7 MMZ    ;MMX   MMi   ;MM   ZMW  MM0  rM 7MM     
        ;MM       MMM7   iMM      ZMM2    0MMa     MMX  8M:  MMM    ZMMS    BMM2  7  MM8 ZMr  :MM  rMB   MM@     iMM     MMZ   iMM    WMW  BM2   MMX     @MM     
        MMi       ;MMM   0MS     2MM7    aMMM     ;MM .8Mi  MMM    aMM7    ZMMM      MM ;Mr   XMM iM8    MMa     0MM    BMM    MMM    MM: BMX   .MM      MM7     
       aMM         BMMM  MM     ;MMX    ZMMMZ     BM@ MMM    .    rMM7    ZMMMZ     :MM:MX    0MZ M8    XMM,     MMX    MM.    ;W:   rMM aMX    ZMM     7MM      
       MM           MMMi MM     MMZ    8M:MM      MM; MMM,        MMa    0M:MM      8MWM8     MMZM0     MMM     rMM    0MM           WMa,M2     MMS     MM8      
      @M0           :MMMXMa    MMM    WM XMB ;   :MM;M8MMM       MMM    @M XM0 ;    MMM@      MMMW      MMrZi   MMS    MMi           MMZM0     rMM Mi   MM :     
     ;MM             BMMMM:   rMM    MM  MMSMa   ZMMM@ iMMr     7MM    MM  MMXM2   :MMM      ZMMM      8MM@@    MMZ0  7MM       ,   :MMMM      MMBMa   0MWBr     
    ,MMMM             MMMM    MMS   MM   MMMZ    MMMM   MMM     MMS  .MM   MMMZ    @MM.      MMM       MMMM    WMM@   0MM      2M   ZMMM      :MMMa    MMM7      
  iMMMMMM@            XMMM   .MM  XMM   aMMM     MMM:    MMW   .MM  XM@   ZMMM     MM0      aMMX      8MMM    .MMM    WMM     ZMr   MMMX      MMM8    0MMS       
 SMMMMi                MMM,  rMM,MM2    MMM:    SMMM     ;MM2  ;MM,MMS    MMM,    MMM       MMM       MMM.    MMM     .MM    MMZ    MMM      XMMM    rMMB        
 :MMM7                 MM@    BMMM      aMM     ;MMX      aMMX  8MMM      ZMM     MM8      .MMX      MMM2    iMMX      ,MMMMMMZ     .@;      MMM     WMM         
    .                  .:                         :        0MMZ                                      .2Z                  :7r.                ;i                 
                                                            0MMMaSMi                                                                                             
                                                             aMMMM7                                                                                              
                                                              .WW                                                                                                
                                                                                                                                                                 
Nakamichi 'Ryuugan-ditto-1TB', written by Kaze, inspired by Haruhiko Okumura sharing, based on Nobuo Ito's LZSS source, muffinesque tips by m^2, Jim Dempsey and Kirill Kryukov enforced.
This latest (2021-Mar-12) compile has B-trees only matchfinder - called 'LITE'; Downloadable at: https://twitter.com/Sanmayce

Nakamichi 'Kaidanji' SUPRALITE highlights:

- Back to supersimplisticism - 'Kaidanji' returns refined. Simply, ripping only orders 4..16 and then quickly trying to expand the match in the found position.

Nakamichi 'Ryuugan-ditto-1TB'/'Dragoneye' LITE highlights:

- The Zennish LZSS Microdeduplicator, a texttoy (file-to-file [de]compressor) written in plain C, 100% FREE - licenseless it is;
- Single-threaded Non-SIMD console tool written entirely by yours truly Sanmayce;
- The first Lempel-Ziv-Storer-Szymanski (LZSS) compressor using 1TB sliding window;
- It targets superfast decompression of huge/tera corpora of textual data;

- LITE means no memmem() (Railgun) invocations are to be made, nah, back to minimalistic Railgun since 2021-Mar-12;
- Compressing at Linear Rate due to Matchfinding based on B-trees only;
- The Leprechaunesque (Internal/External) B-trees order 3 (2 keys MAX) are brutally-optimized;

- Ability to deduplicate (as little as) 64 bytes long chunks 1TB backwards;
- Ability to deduplicate 256[+] bytes long chunks 1TB backwards - when SHA3 enabled;

- CHUNKABLE! Since there are no headers/metadata in .Nakamichi files, arbitrary chunks/blocks can be compressed-n-concatenated;

- SCALABLE! Gets faster when more Physical or/and External RAM is available;
- Dynamical (as command line parameters) selection of HASH & B-trees memory blocks;
- AUTO-RESETTING PASSES (when TargetBuffer is filled then automaticaly restart building by doubling the passes);
- DEFRAGMENTED B-trees are in use during compression stage, their leaves contain only BBs appearing 2[+] times;

- Compileable under Windows and Linux, most suitable to run on 3TB machines;
- Many thanks go to: Haruhiko Okumura, Nobuo Ito, Hamid Buzidi, Landon Noll, Aleksey Vaneev (https://github.com/avaneev/prvhash).

Sanmayce, Nakamichi's author, here, some more notes:

- The B-trees form the second layer, the first being HASH table handled by FNV1A-Pippip - the fastest lookup-hash;
- Hashpot a.k.a. hashpools (residing in Physical RAM) could be tuned via command line parameter, thus lessening the B-trees heights;
- The building of B-trees is done dynamically-n-automatically in PASSES, thus LOCALITY/LOCALIZATION leads to cache-friendliness, for example, instead of confusing/blinding
  the SSD controller with building 2^27 ~= 128M B-trees at a time, 'PASSES' revision lowers the "noise/mayhem" 128 times by processing e.g. (20bit) 1M B-trees at a time;

- For so long, the main goal was to throw it in battle, thus to forge one battle-ready *nix/windows tool with superb hash/search/decompress capabilities.
- Straight up, a wish of mine is to have the latest English Wikipedia XML dump decompressed by Nakamichi into physical RAM and then followed by Kazahana's superfast exact/wildcard/fuzzy etudes.
- Through the years, such a transparent decompressor (load booster) has been losing momentum and kinda became unnecessary, but not for me, when HDDs had 40MB/s sequential read speeds it was ...
  boosty, now with SSDs reading at 1700+MB/s, not so smacky, yet uploading (on 128GB machines, 20GB+72GB needed) the whole Wikipedia ~20GB (instead of 72GB) is better, sizewise.

- Currently, having 16 (4,6,8,10,12,14,16,18,36,64,24,28,48,56,128,256) MatchLens being hashed (plus 1 being phantomic/temporary), 29bit hashtable results in: (16+1)*8*(2^29) = (16+1)*8*(1<<29) =
  69632MB hashpot (the cluster of all hashpools), each slot houses a QWORD (being an offset/address of a B-tree root).
- In near future, wanna see a machine (256GB RAM) crunching the 77,265,813,300 bytes file with this command line (it requires 2x72GB + 68GB + 2930GB = 212GB physical RAM + 2.9TB SSD RAM):
  D:\>timer64 Nakamichi.exe enwiki-20200420-pages-articles.xml enwiki-20200420-pages-articles.xml.Nakamichi 29 3000000 e
- In not so far future, wanna see a machine (4096GB RAM) crunching the 72GB file with this command line (it requires 2x72GB + 272GB + 2930GB = 3.3TB physical RAM):
  D:\>timer64 Nakamichi.exe enwiki-20200420-pages-articles.xml enwiki-20200420-pages-articles.xml.Nakamichi 31 3000000 i

Q: - HOW TO BOOST [BUILDING/COMPRESSION] SPEED?
A: - Now, the name of the game is "RAM in spades", if we have a lot then speed is going to jump a lot. How?
- First, by increasing the hash-pool - 20 (number of bits) was used in 'Taishukan' resulting in 2^20 =~ 1M hash-slots a.k.a. B-trees' roots per keysize, naturally, the bigger the faster since B-trees will
  have less height and will be more - aiming to reach the ideal case - having only hash-slots with no actual B-trees! Back to 'Taishukan', the testfile is ~77MB, it suggests using 128M slots to lower 
  height/branching of B-trees - 2^27 leads to using 27. Feartime, going from 20 to 27: 8*(15+1)*2^(20) = 134,217,793 bytes; with the speed-up hash needs 8*(15+1)*2^(27) = 17,179,869,184 bytes, yes 16GB.
- Second, by lowering passes in building the B-trees - the trick is to increase the number in compile-time parameter -DSpeedUpBuilding=32 - (didn't make it as an execute-time parameter, lazy).
  If we look at the 'Taishukan' console log it tells us that (Target-Buffer 106 MB) x 64 passes = 6784MB are needed for building the B-trees in ONE PASS ONLY, so compile with -DSpeedUpBuilding=6784 instead.

Enfun!

Allocating Source-Buffer 91 MB ... 
Allocating Target-Buffer 5,120 MB ... 
Decompressing 96,311,153 bytes (being the compressed stream) ...
Warming up ...
RAM-to-RAM performance:
2183 MB/s; 2185 MB/s; 2181 MB/s; 2181 MB/s; 2180 MB/s; 2181 MB/s; 2180 MB/s; 2180 MB/s; 2182 MB/s; 2180 MB/s; 2188 MB/s; 2197 MB/s; 2196 MB/s; 2173 MB/s; 2177 MB/s; 2175 MB/s
Enforcing 17 seconds idling to avoid throttling ...
2181 MB/s; 2186 MB/s; 2188 MB/s; 2187 MB/s; 2188 MB/s; 2195 MB/s; 2193 MB/s; 2184 MB/s; 2198 MB/s; 2188 MB/s; 2197 MB/s; 2194 MB/s; 2174 MB/s; 2174 MB/s; 2182 MB/s; 2174 MB/s
Enforcing 17 seconds idling to avoid throttling ...
2178 MB/s; 2174 MB/s; 2180 MB/s; 2179 MB/s; 2179 MB/s; 2182 MB/s; 2183 MB/s; 2182 MB/s; 2195 MB/s; 2196 MB/s; 2193 MB/s; 2175 MB/s; 2179 MB/s; 2180 MB/s; 2184 MB/s; 2191 MB/s
Enforcing 17 seconds idling to avoid throttling ...
RAM-to-RAM (peak) performance: 2198 MB/s.
Source-file-Hash(FNV1A_YoshimitsuTRIAD) = 0xfd87,2fde
Target-file-Hash(FNV1A_YoshimitsuTRIAD) = 0xa5a8,8e5f
	Command being timed: "./Nakamichi_DD-192.elf SUPRAPIG_The_Prague_Stringology_Club_(302-PostScript-files).tar.Nakamichi"
	User time (seconds): 0.26
	System time (seconds): 0.19
	Percent of CPU this job got: 99%
	Elapsed (wall clock) time (h:mm:ss or m:ss): 0:00.46
	Average shared text size (kbytes): 0
	Average unshared data size (kbytes): 0
	Average stack size (kbytes): 0
	Average total size (kbytes): 0
	Maximum resident set size (kbytes): 607224
	Average resident set size (kbytes): 0
	Major (requiring I/O) page faults: 0
	Minor (reclaiming a frame) page faults: 151829
	Voluntary context switches: 1
	Involuntary context switches: 5
	Swaps: 0
	File system inputs: 0
	File system outputs: 0
	Socket messages sent: 0
	Socket messages received: 0
	Signals delivered: 0
	Page size (bytes): 4096
	Exit status: 0

 Performance counter stats for './Nakamichi_DD-192.elf SUPRAPIG_The_Prague_Stringology_Club_(302-PostScript-files).tar.Nakamichi':

            467.67 msec task-clock:u              #    0.998 CPUs utilized          
                 0      context-switches:u        #    0.000 K/sec                  
                 0      cpu-migrations:u          #    0.000 K/sec                  
           128,305      page-faults:u             #    0.274 M/sec                  
       740,383,677      cycles:u                  #    1.583 GHz                      (49.63%)
       770,549,844      instructions:u            #    1.04  insn per cycle           (62.22%)
       114,921,390      branches:u                #  245.731 M/sec                    (62.43%)
         7,732,024      branch-misses:u           #    6.73% of all branches          (62.65%)
        65,470,656      L1-dcache-loads:u         #  139.993 M/sec                    (62.80%)
        22,876,591      L1-dcache-load-misses:u   #   34.94% of all L1-dcache accesses  (62.77%)
         7,295,488      LLC-loads:u               #   15.600 M/sec                    (49.96%)
         1,323,886      LLC-load-misses:u         #   18.15% of all LL-cache accesses  (49.75%)

       0.468404648 seconds time elapsed

       0.246224000 seconds user
       0.216560000 seconds sys


-rw-rw-r--. 1 kaze kaze 524794368 Mar 13 17:49 'SUPRAPIG_The_Prague_Stringology_Club_(302-PostScript-files).tar'
-rwxr-xr-x. 1 kaze kaze  96311153 Mar 14 09:54 'SUPRAPIG_The_Prague_Stringology_Club_(302-PostScript-files).tar.Nakamichi'
-rw-rw-r--. 1 kaze kaze 524794368 Mar 14 09:54 'SUPRAPIG_The_Prague_Stringology_Club_(302-PostScript-files).tar.NKMCH'
[kaze@kaze Nakamichi_2021-Mar-12]$ sh ZSTDify.sh SUPRAPIG_The_Prague_Stringology_Club_\(302-PostScript-files\).tar
79b9c48428daa2c7bd606df7f139423bd2c9c7d2  SUPRAPIG_The_Prague_Stringology_Club_(302-PostScript-files).tar
*** zstd command line interface 64-bits v1.4.9, by Yann Collet ***
stdin is a console, aborting
rm: cannot remove 'SUPRAPIG_The_Prague_Stringology_Club_(302-PostScript-files).tar.L22W2GB.zst': No such file or directory
SUPRAPIG_The_Prague_Stringology_Club_(302-PostScript-files).tar : 12.45%   (524794368 => 65312720 bytes, SUPRAPIG_The_Prague_Stringology_Club_(302-PostScript-files).tar.L22W2GB.zst) 
	Command being timed: "zstd --single-thread --ultra -22 --long=31 --zstd=wlog=31,clog=30,hlog=30,slog=26 SUPRAPIG_The_Prague_Stringology_Club_(302-PostScript-files).tar -o SUPRAPIG_The_Prague_Stringology_Club_(302-PostScript-files).tar.L22W2GB.zst"
	User time (seconds): 207.36
	System time (seconds): 3.34
	Percent of CPU this job got: 99%
	Elapsed (wall clock) time (h:mm:ss or m:ss): 3:31.46
	Average shared text size (kbytes): 0
	Average unshared data size (kbytes): 0
	Average stack size (kbytes): 0
	Average total size (kbytes): 0
	Maximum resident set size (kbytes): 8937896
	Average resident set size (kbytes): 0
	Major (requiring I/O) page faults: 2
	Minor (reclaiming a frame) page faults: 2234013
	Voluntary context switches: 18
	Involuntary context switches: 2265
	Swaps: 0
	File system inputs: 152
	File system outputs: 127568
	Socket messages sent: 0
	Socket messages received: 0
	Signals delivered: 0
	Page size (bytes): 4096
	Exit status: 0
SUPRAPIG_The_Prague_Stringology_Club_(302-PostScript-files).tar.L22W2GB.zst: 524794368 bytes 

 Performance counter stats for 'zstd -d --long=31 SUPRAPIG_The_Prague_Stringology_Club_(302-PostScript-files).tar.L22W2GB.zst -o /dev/null':

            647.96 msec task-clock:u              #    0.994 CPUs utilized          
                 0      context-switches:u        #    0.000 K/sec                  
                 0      cpu-migrations:u          #    0.000 K/sec                  
           128,286      page-faults:u             #    0.198 M/sec                  
     1,354,149,382      cycles:u                  #    2.090 GHz                      (50.04%)
     2,669,111,206      instructions:u            #    1.97  insn per cycle           (62.53%)
       245,243,044      branches:u                #  378.487 M/sec                    (62.52%)
         6,944,542      branch-misses:u           #    2.83% of all branches          (62.51%)
       776,324,523      L1-dcache-loads:u         # 1198.114 M/sec                    (62.51%)
        46,023,390      L1-dcache-load-misses:u   #    5.93% of all L1-dcache accesses  (62.45%)
         4,247,086      LLC-loads:u               #    6.555 M/sec                    (49.98%)
         1,328,543      LLC-load-misses:u         #   31.28% of all LL-cache accesses  (49.98%)

       0.652073060 seconds time elapsed

       0.462065000 seconds user
       0.178737000 seconds sys


-rw-rw-r--. 1 kaze kaze 524794368 Mar 13 17:49 'SUPRAPIG_The_Prague_Stringology_Club_(302-PostScript-files).tar'
-rw-rw-r--. 1 kaze kaze  65312720 Mar 13 17:49 'SUPRAPIG_The_Prague_Stringology_Club_(302-PostScript-files).tar.L22W2GB.zst'
-rwxr-xr-x. 1 kaze kaze  96311153 Mar 14 09:54 'SUPRAPIG_The_Prague_Stringology_Club_(302-PostScript-files).tar.Nakamichi'
-rw-rw-r--. 1 kaze kaze 524794368 Mar 14 09:54 'SUPRAPIG_The_Prague_Stringology_Club_(302-PostScript-files).tar.NKMCH'
[kaze@kaze Nakamichi_2021-Mar-12]$ sh BZIP2ify.sh SUPRAPIG_The_Prague_Stringology_Club_\(302-PostScript-files\).tar
79b9c48428daa2c7bd606df7f139423bd2c9c7d2  SUPRAPIG_The_Prague_Stringology_Club_(302-PostScript-files).tar
rm: cannot remove 'SUPRAPIG_The_Prague_Stringology_Club_(302-PostScript-files).tar.bz2': No such file or directory
	Command being timed: "bzip2 -9 -k SUPRAPIG_The_Prague_Stringology_Club_(302-PostScript-files).tar"
	User time (seconds): 61.33
	System time (seconds): 0.16
	Percent of CPU this job got: 99%
	Elapsed (wall clock) time (h:mm:ss or m:ss): 1:01.71
	Average shared text size (kbytes): 0
	Average unshared data size (kbytes): 0
	Average stack size (kbytes): 0
	Average total size (kbytes): 0
	Maximum resident set size (kbytes): 8760
	Average resident set size (kbytes): 0
	Major (requiring I/O) page faults: 2
	Minor (reclaiming a frame) page faults: 1918
	Voluntary context switches: 11
	Involuntary context switches: 463
	Swaps: 0
	File system inputs: 88
	File system outputs: 275224
	Socket messages sent: 0
	Socket messages received: 0
	Signals delivered: 0
	Page size (bytes): 4096
	Exit status: 0

 Performance counter stats for 'bzip2 -d -k':

         20,366.91 msec task-clock:u              #    0.999 CPUs utilized          
                 0      context-switches:u        #    0.000 K/sec                  
                 0      cpu-migrations:u          #    0.000 K/sec                  
               956      page-faults:u             #    0.047 K/sec                  
    61,286,480,655      cycles:u                  #    3.009 GHz                      (50.00%)
    58,659,588,113      instructions:u            #    0.96  insn per cycle           (62.50%)
    10,811,812,985      branches:u                #  530.852 M/sec                    (62.50%)
       622,106,363      branch-misses:u           #    5.75% of all branches          (62.50%)
    14,815,260,347      L1-dcache-loads:u         #  727.418 M/sec                    (62.50%)
       476,042,593      L1-dcache-load-misses:u   #    3.21% of all L1-dcache accesses  (62.50%)
       284,011,194      LLC-loads:u               #   13.945 M/sec                    (50.00%)
        52,961,157      LLC-load-misses:u         #   18.65% of all LL-cache accesses  (50.00%)

      20.379144461 seconds time elapsed

      20.072747000 seconds user
       0.112836000 seconds sys


[kaze@kaze Nakamichi_2021-Mar-12]$ ls -l SUP*Str*
-rw-rw-r--. 1 kaze kaze 524794368 Mar 13 17:49 'SUPRAPIG_The_Prague_Stringology_Club_(302-PostScript-files).tar'
-rw-rw-r--. 1 kaze kaze 140913297 Mar 13 17:49 'SUPRAPIG_The_Prague_Stringology_Club_(302-PostScript-files).tar.bz2'
-rw-rw-r--. 1 kaze kaze  65312720 Mar 13 17:49 'SUPRAPIG_The_Prague_Stringology_Club_(302-PostScript-files).tar.L22W2GB.zst'
-rwxr-xr-x. 1 kaze kaze  96311153 Mar 14 09:54 'SUPRAPIG_The_Prague_Stringology_Club_(302-PostScript-files).tar.Nakamichi'
-rw-rw-r--. 1 kaze kaze 524794368 Mar 14 09:54 'SUPRAPIG_The_Prague_Stringology_Club_(302-PostScript-files).tar.NKMCH'
[kaze@kaze Nakamichi_2021-Mar-12]$ 

[kaze@kaze Nakamichi_2021-Mar-12]$ sh BROTLIify.sh SUPRAPIG_The_Prague_Stringology_Club_\(302-PostScript-files\).tar
79b9c48428daa2c7bd606df7f139423bd2c9c7d2  SUPRAPIG_The_Prague_Stringology_Club_(302-PostScript-files).tar
	Command being timed: "./brotli -q 11 --large_window=30 SUPRAPIG_The_Prague_Stringology_Club_(302-PostScript-files).tar"
	User time (seconds): 667.95
	System time (seconds): 1.92
	Percent of CPU this job got: 99%
	Elapsed (wall clock) time (h:mm:ss or m:ss): 11:11.44
	Average shared text size (kbytes): 0
	Average unshared data size (kbytes): 0
	Average stack size (kbytes): 0
	Average total size (kbytes): 0
	Maximum resident set size (kbytes): 3895908
	Average resident set size (kbytes): 0
	Major (requiring I/O) page faults: 0
	Minor (reclaiming a frame) page faults: 1015663
	Voluntary context switches: 1
	Involuntary context switches: 8022
	Swaps: 0
	File system inputs: 0
	File system outputs: 122240
	Socket messages sent: 0
	Socket messages received: 0
	Signals delivered: 0
	Page size (bytes): 4096
	Exit status: 0

 Performance counter stats for './brotli -d -c SUPRAPIG_The_Prague_Stringology_Club_(302-PostScript-files).tar.br':

          1,531.58 msec task-clock:u              #    0.999 CPUs utilized          
                 0      context-switches:u        #    0.000 K/sec                  
                 0      cpu-migrations:u          #    0.000 K/sec                  
           251,875      page-faults:u             #    0.164 M/sec                  
     3,637,944,082      cycles:u                  #    2.375 GHz                      (49.87%)
     5,117,590,378      instructions:u            #    1.41  insn per cycle           (62.40%)
       756,866,409      branches:u                #  494.172 M/sec                    (62.48%)
        17,627,666      branch-misses:u           #    2.33% of all branches          (62.55%)
     1,837,439,426      L1-dcache-loads:u         # 1199.698 M/sec                    (62.61%)
        39,861,390      L1-dcache-load-misses:u   #    2.17% of all L1-dcache accesses  (62.58%)
        10,945,248      LLC-loads:u               #    7.146 M/sec                    (49.99%)
         5,206,771      LLC-load-misses:u         #   47.57% of all LL-cache accesses  (49.92%)

       1.532774902 seconds time elapsed

       1.197501000 seconds user
       0.320869000 seconds sys



















-rw-rw-r--. 1 kaze kaze 62585595 Mar 13 17:49 'SUPRAPIG_The_Prague_Stringology_Club_(302-PostScript-files).tar.br'
[kaze@kaze Nakamichi_2021-Mar-12]$ 

[kaze@kaze Nakamichi_2021-Mar-12]$ zramctl 
NAME       ALGORITHM DISKSIZE DATA COMPR TOTAL STREAMS MOUNTPOINT
/dev/zram0 lzo-rle     140.6G   4K   75B   12K       4 [SWAP]
[kaze@kaze Nakamichi_2021-Mar-12]$ ls  -l
total 6085120
-rwxr-xr-x. 1 kaze kaze     772448 Mar 14 22:56  brotli
-rwxr-xr-x. 1 kaze kaze        158 Mar 14 23:58  BROTLIify.sh
-rw-r--r--. 1 kaze kaze        114 Mar 13 17:29  BZIP2ify.sh
-rw-r--r--. 1 kaze kaze      48438 Mar 15 00:14  Compressionette.txt
-rw-r--r--. 1 kaze kaze 1317937667 Feb 16 11:05  coronavirus.unwrapped.fasta
-rwxrwxrwx. 1 kaze kaze  100000000 Mar 28  2019  enwik8
-rwxrwxrwx. 1 kaze kaze   29008758 Mar 28  2019  enwik8.bz2
-rwxrwxrwx. 1 kaze kaze   25328049 Mar 28  2019  enwik8.L22W2GB.zst
-rw-r-----. 1 kaze kaze   21274371 Mar 15 03:22  enwik8.zv
-rwxrwxrwx. 1 kaze kaze 1000000000 Mar 28  2019  enwik9
-rw-rw-r--. 1 kaze kaze         47 Mar 14 22:00  enwik9.NKMCH
-rwxr-xr-x. 1 kaze kaze  226877440 Jan 25 09:28  glibc-2.32.tar
-rwxr-xr-x. 1 kaze kaze   23982240 Jan 25 09:28  glibc-2.32.tar.bz2
-rwxr-xr-x. 1 kaze kaze 1064366080 Mar 10 10:32  linux-5.11.5.tar
-rw-r--r--. 1 kaze kaze      55397 Mar 13 06:17  lzsse2.cpp
-rw-r--r--. 1 kaze kaze       4858 Mar 13 06:17  lzsse2.h
-rw-r--r--. 1 kaze kaze       2481 Mar 13 06:17  lzsse2_platform.h
-rw-r--r--. 1 kaze kaze      71964 Mar 13 06:17  LZSS-master.zip
-rw-r--r--. 1 kaze kaze       2137 Mar 13 06:17  _MakeELF_Nakamichi_GCC.sh
-rw-r--r--. 1 kaze kaze       2428 Mar 13 06:17  _MakeEXE_Nakamichi_GCC.bat
-rw-r--r--. 1 kaze kaze       3010 Mar 13 06:17  _MakeEXE_Nakamichi_ICL.bat
-rw-r--r--. 1 kaze kaze       1633 Mar 13 06:17 'MokujIN Amber 217 prompt.lnk'
-rw-r--r--. 1 kaze kaze      75776 Mar 13 06:17  Nakamichi_DD-192_32bit.exe
-rw-r--r--. 1 kaze kaze      83968 Mar 13 06:17  Nakamichi_DD-192_64bit.exe
-rwxrwxr-x. 1 kaze kaze     857952 Mar 13 17:51  Nakamichi_DD-192.elf
-rwxrwxr-x. 1 kaze kaze     142336 Mar 13 17:51  Nakamichi_DD-192.exe
-rw-r--r--. 1 kaze kaze        559 Mar 13 06:17  Nakamichify_external-128GB.bat
-rw-r--r--. 1 kaze kaze        498 Mar 13 06:17  Nakamichify_internal-128GB.bat
-rw-r--r--. 1 kaze kaze        344 Mar 13 06:17  Nakamichify_internal-128GB.sh
-rw-r--r--. 1 kaze kaze        344 Mar 13 06:17  Nakamichify_internal-1TB.sh
-rw-r--r--. 1 kaze kaze        345 Mar 13 06:17  Nakamichify_internal-2TB.sh
-rwxrwxr-x. 1 kaze kaze     857952 Mar 13 17:51  Nakamichi_PRV-192.elf
-rwxrwxr-x. 1 kaze kaze     143360 Mar 13 17:51  Nakamichi_PRV-192.exe
-rw-rw-r--. 1 kaze kaze      47816 Mar 14 13:14  Nakamichi.ratio-graph.csv
-rw-r--r--. 1 kaze kaze    1490807 Mar 13 06:17  Nakamichi_Ryuugan-ditto-1TB_btree.c
-rwxrwxr-x. 1 kaze kaze     857952 Mar 13 17:51  Nakamichi_SHA3-192.elf
-rwxrwxr-x. 1 kaze kaze     142336 Mar 13 17:51  Nakamichi_SHA3-192.exe
-rw-r--r--. 1 kaze kaze       3485 Mar 13 06:17  prvhash42.h
-rw-rw-r--. 1 kaze kaze         65 Mar 15 03:29  qq
-rw-r--r--. 1 kaze kaze      49152 Mar 13 06:17  sha1sum.exe
drwx------. 2 kaze kaze       4096 Mar 15 03:22  stdout
-rw-rw-r--. 1 kaze kaze  524794368 Mar 13 17:49 'SUPRAPIG_The_Prague_Stringology_Club_(302-PostScript-files).tar'
-rw-rw-r--. 1 kaze kaze   62585595 Mar 13 17:49 'SUPRAPIG_The_Prague_Stringology_Club_(302-PostScript-files).tar.br'
-rw-rw-r--. 1 kaze kaze  140913297 Mar 13 17:49 'SUPRAPIG_The_Prague_Stringology_Club_(302-PostScript-files).tar.bz2'
-rw-rw-r--. 1 kaze kaze   65312720 Mar 13 17:49 'SUPRAPIG_The_Prague_Stringology_Club_(302-PostScript-files).tar.L22W2GB.zst'
-rwxr-xr-x. 1 kaze kaze   96311153 Mar 14 09:54 'SUPRAPIG_The_Prague_Stringology_Club_(302-PostScript-files).tar.Nakamichi'
-rw-rw-r--. 1 kaze kaze  524794368 Mar 14 09:54 'SUPRAPIG_The_Prague_Stringology_Club_(302-PostScript-files).tar.NKMCH'
-rw-r--r--. 1 kaze kaze       6144 Mar 13 06:17  timer64.exe
-rw-r--r--. 1 kaze kaze 1000000000 Dec 25 22:43  TS100.txt
-rwxr-xr-x. 1 kaze kaze    1823256 Mar 13 06:33  turbobwt.elf
-rw-r--r--. 1 kaze kaze        241 Mar 13 06:17  ZSTDify.sh
[kaze@kaze Nakamichi_2021-Mar-12]$ sh Nakamichify_internal-128GB.sh coronavirus.unwrapped.fasta 
0b58ebce92369603ea03c6e11fb966476a1ba133  coronavirus.unwrapped.fasta
                                                                                                                                                                 
                                                            SMMi                                                                               :MM2              
                                                           0MMMMM:                                                                            rMMMMMa            
                                                          ZMMM. 0Z                                                                           :MMM7 7B            
                                                         rMM@                                                                                MMM                 
         7                                               MMM                                                                                MMM.                 
       BMMMa XZ               :MM:                      MMM                                                                                XMMX                  
     XMSANMAYCE;             rMMMM                     rMM;                                                                                MM@                   
    WM0  2MMMMM             ZMMMM                      MMW                                                                                BMM                    
    :      MMMB           aMMMMW                      2MM                                                           :MM8                  MM7               8MMi 
            MMMZ           XMMM                       MMa                                                         .WMMM0                 @MM              rMMMMi 
            MMMMa           MM,                      aMM                                                          XMMB                   MM:              MMM2   
           @MXMMM7         0MM                       MMS                                                                                WMM                      
           MM  MMM,        MM7                      7MM                                                                                 MM:                      
          MMX  ;MMM       iMM         MMM8  .       MM8     MMS         MMMZ  .     iMBi    :MMMX      @MMa      WB:       XMMZ2aX     ZMM     MMM2     :M2      
         :MM    ZMMM      BM8       ;MMMMMaaMM     ,MM    XMM@MM      rMMMMM2aMM   XMMMM   SMMSMM.    MMXMMM    MMMM0     aMMMa@MMr    MMS   ;MM;MM8   XMMMM.    
         MMr     MMM0     MM       2MMW    MMM     0MM   ZMS 2MM.    aMMB    MMM  BM aMM  8Ma  MM   iMM  BMM   M7 MMZ    ;MMX   MMi   ;MM   ZMW  MM0  rM 7MM     
        ;MM       MMM7   iMM      ZMM2    0MMa     MMX  8M:  MMM    ZMMS    BMM2  7  MM8 ZMr  :MM  rMB   MM@     iMM     MMZ   iMM    WMW  BM2   MMX     @MM     
        MMi       ;MMM   0MS     2MM7    aMMM     ;MM .8Mi  MMM    aMM7    ZMMM      MM ;Mr   XMM iM8    MMa     0MM    BMM    MMM    MM: BMX   .MM      MM7     
       aMM         BMMM  MM     ;MMX    ZMMMZ     BM@ MMM    .    rMM7    ZMMMZ     :MM:MX    0MZ M8    XMM,     MMX    MM.    ;W:   rMM aMX    ZMM     7MM      
       MM           MMMi MM     MMZ    8M:MM      MM; MMM,        MMa    0M:MM      8MWM8     MMZM0     MMM     rMM    0MM           WMa,M2     MMS     MM8      
      @M0           :MMMXMa    MMM    WM XMB ;   :MM;M8MMM       MMM    @M XM0 ;    MMM@      MMMW      MMrZi   MMS    MMi           MMZM0     rMM Mi   MM :     
     ;MM             BMMMM:   rMM    MM  MMSMa   ZMMM@ iMMr     7MM    MM  MMXM2   :MMM      ZMMM      8MM@@    MMZ0  7MM       ,   :MMMM      MMBMa   0MWBr     
    ,MMMM             MMMM    MMS   MM   MMMZ    MMMM   MMM     MMS  .MM   MMMZ    @MM.      MMM       MMMM    WMM@   0MM      2M   ZMMM      :MMMa    MMM7      
  iMMMMMM@            XMMM   .MM  XMM   aMMM     MMM:    MMW   .MM  XM@   ZMMM     MM0      aMMX      8MMM    .MMM    WMM     ZMr   MMMX      MMM8    0MMS       
 SMMMMi                MMM,  rMM,MM2    MMM:    SMMM     ;MM2  ;MM,MMS    MMM,    MMM       MMM       MMM.    MMM     .MM    MMZ    MMM      XMMM    rMMB        
 :MMM7                 MM@    BMMM      aMM     ;MMX      aMMX  8MMM      ZMM     MM8      .MMX      MMM2    iMMX      ,MMMMMMZ     .@;      MMM     WMM         
    .                  .:                         :        0MMZ                                      .2Z                  :7r.                ;i                 
                                                            0MMMaSMi                                                                                             
                                                             aMMMM7                                                                                              
                                                              .WW                                                                                                
                                                                                                                                                                 
Nakamichi 'Ryuugan-ditto-1TB', written by Kaze, inspired by Haruhiko Okumura sharing, based on Nobuo Ito's LZSS source, muffinesque tips by m^2, Jim Dempsey and Kirill Kryukov enforced.
This latest (2021-Mar-12) compile has B-trees only matchfinder - called 'LITE'; Downloadable at: https://twitter.com/Sanmayce

Nakamichi 'Kaidanji' SUPRALITE highlights:

- Back to supersimplisticism - 'Kaidanji' returns refined. Simply, ripping only orders 4..16 and then quickly trying to expand the match in the found position.

Nakamichi 'Ryuugan-ditto-1TB'/'Dragoneye' LITE highlights:

- The Zennish LZSS Microdeduplicator, a texttoy (file-to-file [de]compressor) written in plain C, 100% FREE - licenseless it is;
- Single-threaded Non-SIMD console tool written entirely by yours truly Sanmayce;
- The first Lempel-Ziv-Storer-Szymanski (LZSS) compressor using 1TB sliding window;
- It targets superfast decompression of huge/tera corpora of textual data;

- LITE means no memmem() (Railgun) invocations are to be made, nah, back to minimalistic Railgun since 2021-Mar-12;
- Compressing at Linear Rate due to Matchfinding based on B-trees only;
- The Leprechaunesque (Internal/External) B-trees order 3 (2 keys MAX) are brutally-optimized;

- Ability to deduplicate (as little as) 64 bytes long chunks 1TB backwards;
- Ability to deduplicate 256[+] bytes long chunks 1TB backwards - when SHA3 enabled;

- CHUNKABLE! Since there are no headers/metadata in .Nakamichi files, arbitrary chunks/blocks can be compressed-n-concatenated;

- SCALABLE! Gets faster when more Physical or/and External RAM is available;
- Dynamical (as command line parameters) selection of HASH & B-trees memory blocks;
- AUTO-RESETTING PASSES (when TargetBuffer is filled then automaticaly restart building by doubling the passes);
- DEFRAGMENTED B-trees are in use during compression stage, their leaves contain only BBs appearing 2[+] times;

- Compileable under Windows and Linux, most suitable to run on 3TB machines;
- Many thanks go to: Haruhiko Okumura, Nobuo Ito, Hamid Buzidi, Landon Noll, Aleksey Vaneev (https://github.com/avaneev/prvhash).

Sanmayce, Nakamichi's author, here, some more notes:

- The B-trees form the second layer, the first being HASH table handled by FNV1A-Pippip - the fastest lookup-hash;
- Hashpot a.k.a. hashpools (residing in Physical RAM) could be tuned via command line parameter, thus lessening the B-trees heights;
- The building of B-trees is done dynamically-n-automatically in PASSES, thus LOCALITY/LOCALIZATION leads to cache-friendliness, for example, instead of confusing/blinding
  the SSD controller with building 2^27 ~= 128M B-trees at a time, 'PASSES' revision lowers the "noise/mayhem" 128 times by processing e.g. (20bit) 1M B-trees at a time;

- For so long, the main goal was to throw it in battle, thus to forge one battle-ready *nix/windows tool with superb hash/search/decompress capabilities.
- Straight up, a wish of mine is to have the latest English Wikipedia XML dump decompressed by Nakamichi into physical RAM and then followed by Kazahana's superfast exact/wildcard/fuzzy etudes.
- Through the years, such a transparent decompressor (load booster) has been losing momentum and kinda became unnecessary, but not for me, when HDDs had 40MB/s sequential read speeds it was ...
  boosty, now with SSDs reading at 1700+MB/s, not so smacky, yet uploading (on 128GB machines, 20GB+72GB needed) the whole Wikipedia ~20GB (instead of 72GB) is better, sizewise.

- Currently, having 16 (4,6,8,10,12,14,16,18,36,64,24,28,48,56,128,256) MatchLens being hashed (plus 1 being phantomic/temporary), 29bit hashtable results in: (16+1)*8*(2^29) = (16+1)*8*(1<<29) =
  69632MB hashpot (the cluster of all hashpools), each slot houses a QWORD (being an offset/address of a B-tree root).
- In near future, wanna see a machine (256GB RAM) crunching the 77,265,813,300 bytes file with this command line (it requires 2x72GB + 68GB + 2930GB = 212GB physical RAM + 2.9TB SSD RAM):
  D:\>timer64 Nakamichi.exe enwiki-20200420-pages-articles.xml enwiki-20200420-pages-articles.xml.Nakamichi 29 3000000 e
- In not so far future, wanna see a machine (4096GB RAM) crunching the 72GB file with this command line (it requires 2x72GB + 272GB + 2930GB = 3.3TB physical RAM):
  D:\>timer64 Nakamichi.exe enwiki-20200420-pages-articles.xml enwiki-20200420-pages-articles.xml.Nakamichi 31 3000000 i

Q: - HOW TO BOOST [BUILDING/COMPRESSION] SPEED?
A: - Now, the name of the game is "RAM in spades", if we have a lot then speed is going to jump a lot. How?
- First, by increasing the hash-pool - 20 (number of bits) was used in 'Taishukan' resulting in 2^20 =~ 1M hash-slots a.k.a. B-trees' roots per keysize, naturally, the bigger the faster since B-trees will
  have less height and will be more - aiming to reach the ideal case - having only hash-slots with no actual B-trees! Back to 'Taishukan', the testfile is ~77MB, it suggests using 128M slots to lower 
  height/branching of B-trees - 2^27 leads to using 27. Feartime, going from 20 to 27: 8*(15+1)*2^(20) = 134,217,793 bytes; with the speed-up hash needs 8*(15+1)*2^(27) = 17,179,869,184 bytes, yes 16GB.
- Second, by lowering passes in building the B-trees - the trick is to increase the number in compile-time parameter -DSpeedUpBuilding=32 - (didn't make it as an execute-time parameter, lazy).
  If we look at the 'Taishukan' console log it tells us that (Target-Buffer 106 MB) x 64 passes = 6784MB are needed for building the B-trees in ONE PASS ONLY, so compile with -DSpeedUpBuilding=6784 instead.

Enfun!

This compile uses B-trees only, no memmem() invocations - it compresses worse but much faster.
Allocating Source-Buffer 1,256 MB ... 
Allocating Target-Buffer 1,576 MB ... 
Source-file-Hash(FNV1A_YoshimitsuTRIAD) = 0xc552,41ea
Leprechaun: Memory pool for B-trees is 123,000 MB.
Leprechaun: In this revision 512MB 16-way hash is used which results in 16 x 67,108,864 internal B-Trees of order 3.
Leprechaun: Allocating HASH memory 9,126,805,569 bytes = 8*(16+1)*2^(26) ... OK
Leprechaun: Allocating memory for B-trees 123001 MB ... OK
Leprechaun: Size of input file: 1,317,937,667

Leprechaun: Using (first 24 bytes of) DoubleDeuce (a.k.a. 3x2x4B=24B: 2xCastagnoli, 2xKoopman, 2xKoopman2) for Matches 24+ long, in order to reduce memory footprint.
Leprechaun: Inserting keys/BBs of order 004 into B-trees, free RAM in B-tree pool is 00,123,000 MB; Pass #000,001 of 000,001 ... DONE; 00,000,015,333 DEFRAGMENTED B-trees have been rooted so far.
            15,333 TotalNonUnique (of length 004) keys have been inserted into DEFRAGMENTED B-trees.
Leprechaun: Inserting keys/BBs of order 006 into B-trees, free RAM in B-tree pool is 00,122,999 MB; Pass #000,001 of 000,001 ... DONE; 00,000,081,131 DEFRAGMENTED B-trees have been rooted so far.
            65,832 TotalNonUnique (of length 006) keys have been inserted into DEFRAGMENTED B-trees.
Leprechaun: Inserting keys/BBs of order 008 into B-trees, free RAM in B-tree pool is 00,122,995 MB; Pass #000,001 of 000,001 ... DONE; 00,000,277,725 DEFRAGMENTED B-trees have been rooted so far.
            196,894 TotalNonUnique (of length 008) keys have been inserted into DEFRAGMENTED B-trees.
Leprechaun: Inserting keys/BBs of order 010 into B-trees, free RAM in B-tree pool is 00,122,985 MB; Pass #000,001 of 000,001 ... DONE; 00,000,611,661 DEFRAGMENTED B-trees have been rooted so far.
            334,760 TotalNonUnique (of length 010) keys have been inserted into DEFRAGMENTED B-trees.
Leprechaun: Inserting keys/BBs of order 012 into B-trees, free RAM in B-tree pool is 00,122,965 MB; Pass #000,001 of 000,001 ... DONE; 00,001,026,325 DEFRAGMENTED B-trees have been rooted so far.
            415,990 TotalNonUnique (of length 012) keys have been inserted into DEFRAGMENTED B-trees.
Leprechaun: Inserting keys/BBs of order 014 into B-trees, free RAM in B-tree pool is 00,122,939 MB; Pass #000,001 of 000,001 ... DONE; 00,001,515,256 DEFRAGMENTED B-trees have been rooted so far.
            490,765 TotalNonUnique (of length 014) keys have been inserted into DEFRAGMENTED B-trees.
Leprechaun: Inserting keys/BBs of order 016 into B-trees, free RAM in B-tree pool is 00,122,906 MB; Pass #000,001 of 000,001 ... DONE; 00,002,075,597 DEFRAGMENTED B-trees have been rooted so far.
            562,732 TotalNonUnique (of length 016) keys have been inserted into DEFRAGMENTED B-trees.
Leprechaun: Inserting keys/BBs of order 018 into B-trees, free RAM in B-tree pool is 00,122,866 MB; Pass #000,001 of 000,001 ... DONE; 00,002,704,954 DEFRAGMENTED B-trees have been rooted so far.
            632,407 TotalNonUnique (of length 018) keys have been inserted into DEFRAGMENTED B-trees.
Leprechaun: Inserting keys/BBs of order 036 into B-trees, free RAM in B-tree pool is 00,122,820 MB; Pass #000,001 of 000,001 ... DONE; 00,003,889,072 DEFRAGMENTED B-trees have been rooted so far.
            1,194,663 TotalNonUnique (of length 036) keys have been inserted into DEFRAGMENTED B-trees.
Leprechaun: Inserting keys/BBs of order 064 into B-trees, free RAM in B-tree pool is 00,122,718 MB; Pass #000,001 of 000,001 ... DONE; 00,005,793,545 DEFRAGMENTED B-trees have been rooted so far.
            1,932,047 TotalNonUnique (of length 064) keys have been inserted into DEFRAGMENTED B-trees.
Leprechaun: Inserting keys/BBs of order 024 into B-trees, free RAM in B-tree pool is 00,122,555 MB; Pass #000,001 of 000,001 ... DONE; 00,006,619,268 DEFRAGMENTED B-trees have been rooted so far.
            831,466 TotalNonUnique (of length 024) keys have been inserted into DEFRAGMENTED B-trees.
Leprechaun: Inserting keys/BBs of order 028 into B-trees, free RAM in B-tree pool is 00,122,484 MB; Pass #000,001 of 000,001 ... DONE; 00,007,569,313 DEFRAGMENTED B-trees have been rooted so far.
            956,850 TotalNonUnique (of length 028) keys have been inserted into DEFRAGMENTED B-trees.
Leprechaun: Inserting keys/BBs of order 048 into B-trees, free RAM in B-tree pool is 00,122,402 MB; Pass #000,001 of 000,001 ... DONE; 00,009,079,092 DEFRAGMENTED B-trees have been rooted so far.
            1,526,965 TotalNonUnique (of length 048) keys have been inserted into DEFRAGMENTED B-trees.
Leprechaun: Inserting keys/BBs of order 056 into B-trees, free RAM in B-tree pool is 00,122,272 MB; Pass #000,001 of 000,001 ... DONE; 00,010,791,288 DEFRAGMENTED B-trees have been rooted so far.
            1,734,434 TotalNonUnique (of length 056) keys have been inserted into DEFRAGMENTED B-trees.
Leprechaun: Inserting keys/BBs of order 128 into B-trees, free RAM in B-tree pool is 00,122,125 MB; Pass #000,001 of 000,001 ... DONE; 00,014,013,480 DEFRAGMENTED B-trees have been rooted so far.
            3,302,025 TotalNonUnique (of length 128) keys have been inserted into DEFRAGMENTED B-trees.
Leprechaun: Inserting keys/BBs of order 256 into B-trees, free RAM in B-tree pool is 00,121,849 MB; Pass #000,001 of 000,001 ... 
Leprechaun: Failure! Increment 'Memory for B-trees'!
Automatically increasing number of passes in order to fit B-trees into Target Buffer.
Leprechaun: Inserting keys/BBs of order 256 into B-trees, free RAM in B-tree pool is 00,121,617 MB; Pass #000,002 of 000,002 ... DONE; 00,019,389,893 DEFRAGMENTED B-trees have been rooted so far.
            5,604,032 TotalNonUnique (of length 256) keys have been inserted into DEFRAGMENTED B-trees.

Histogram (rotate it 90 degrees clockwise) of Unique-Building-Blocks appearing 2[+] times (e.g. 'alfalfa-alfa' stream has 1 BB with length 4 appearing 3 times thus adding 1 to the count for {004]):
5,604,032{256]
3,302,025{128]
1,932,047{064]
1,734,434{056]
1,526,965{048]
1,194,663{036]
  956,850{028]
  831,466{024]
  632,407{018]
  562,732{016]
  490,765{014]
  415,990{012]
  334,760{010]
  196,894{008]
   65,832{006]
   15,333{004]

Leprechaun: Total Searches-n-Inserts Per Second: 2,760,865 SNIPS = 23,340,358,016 keys in 8,454 seconds
Leprechaun: RAM needed to house B-trees (relative to the file being ripped): 1N = 1,614MB
Leprechaun: RAM needed to build B-trees IN ONE PASS: (Target-Buffer = 1,576 MB) x 2 passes = 3,152MB
Note: In case of RAM in spades then may use compile option: -DSpeedUpBuilding=3152

Compressing 1,317,937,667 bytes ...
-; Each rotation means 64KB are encoded; Speed: 0,073,117 B/s; Done 100%; Compression Ratio: 98.46:1; Matches(16/24/48): 21,240/27,940/21,757; 128[+] long matches: 2,596,311; ETA: 0.00 hours  
NumberOfFullLiterals (lower-the-better): 112
RAM-to-RAM performance: 73117 B/s.
Compressed to 13,384,856 bytes.
Source-file-Hash(FNV1A_YoshimitsuTRIAD) = 0xc552,41ea
Target-file-Hash(FNV1A_YoshimitsuTRIAD) = 0x0f30,a09c
	Command being timed: "./Nakamichi_DD-192.elf coronavirus.unwrapped.fasta coronavirus.unwrapped.fasta.Nakamichi 26 123000 i"
	User time (seconds): 26418.44
	System time (seconds): 7.68
	Percent of CPU this job got: 99%
	Elapsed (wall clock) time (h:mm:ss or m:ss): 7:21:21
	Average shared text size (kbytes): 0
	Average unshared data size (kbytes): 0
	Average stack size (kbytes): 0
	Average total size (kbytes): 0
	Maximum resident set size (kbytes): 13467424
	Average resident set size (kbytes): 0
	Major (requiring I/O) page faults: 11
	Minor (reclaiming a frame) page faults: 3369921
	Voluntary context switches: 11
	Involuntary context switches: 358146
	Swaps: 0
	File system inputs: 1568
	File system outputs: 26640
	Socket messages sent: 0
	Socket messages received: 0
	Signals delivered: 0
	Page size (bytes): 4096
	Exit status: 0
0b58ebce92369603ea03c6e11fb966476a1ba133  coronavirus.unwrapped.fasta.NKMCH
                                                                                                                                                                 
                                                            SMMi                                                                               :MM2              
                                                           0MMMMM:                                                                            rMMMMMa            
                                                          ZMMM. 0Z                                                                           :MMM7 7B            
                                                         rMM@                                                                                MMM                 
         7                                               MMM                                                                                MMM.                 
       BMMMa XZ               :MM:                      MMM                                                                                XMMX                  
     XMSANMAYCE;             rMMMM                     rMM;                                                                                MM@                   
    WM0  2MMMMM             ZMMMM                      MMW                                                                                BMM                    
    :      MMMB           aMMMMW                      2MM                                                           :MM8                  MM7               8MMi 
            MMMZ           XMMM                       MMa                                                         .WMMM0                 @MM              rMMMMi 
            MMMMa           MM,                      aMM                                                          XMMB                   MM:              MMM2   
           @MXMMM7         0MM                       MMS                                                                                WMM                      
           MM  MMM,        MM7                      7MM                                                                                 MM:                      
          MMX  ;MMM       iMM         MMM8  .       MM8     MMS         MMMZ  .     iMBi    :MMMX      @MMa      WB:       XMMZ2aX     ZMM     MMM2     :M2      
         :MM    ZMMM      BM8       ;MMMMMaaMM     ,MM    XMM@MM      rMMMMM2aMM   XMMMM   SMMSMM.    MMXMMM    MMMM0     aMMMa@MMr    MMS   ;MM;MM8   XMMMM.    
         MMr     MMM0     MM       2MMW    MMM     0MM   ZMS 2MM.    aMMB    MMM  BM aMM  8Ma  MM   iMM  BMM   M7 MMZ    ;MMX   MMi   ;MM   ZMW  MM0  rM 7MM     
        ;MM       MMM7   iMM      ZMM2    0MMa     MMX  8M:  MMM    ZMMS    BMM2  7  MM8 ZMr  :MM  rMB   MM@     iMM     MMZ   iMM    WMW  BM2   MMX     @MM     
        MMi       ;MMM   0MS     2MM7    aMMM     ;MM .8Mi  MMM    aMM7    ZMMM      MM ;Mr   XMM iM8    MMa     0MM    BMM    MMM    MM: BMX   .MM      MM7     
       aMM         BMMM  MM     ;MMX    ZMMMZ     BM@ MMM    .    rMM7    ZMMMZ     :MM:MX    0MZ M8    XMM,     MMX    MM.    ;W:   rMM aMX    ZMM     7MM      
       MM           MMMi MM     MMZ    8M:MM      MM; MMM,        MMa    0M:MM      8MWM8     MMZM0     MMM     rMM    0MM           WMa,M2     MMS     MM8      
      @M0           :MMMXMa    MMM    WM XMB ;   :MM;M8MMM       MMM    @M XM0 ;    MMM@      MMMW      MMrZi   MMS    MMi           MMZM0     rMM Mi   MM :     
     ;MM             BMMMM:   rMM    MM  MMSMa   ZMMM@ iMMr     7MM    MM  MMXM2   :MMM      ZMMM      8MM@@    MMZ0  7MM       ,   :MMMM      MMBMa   0MWBr     
    ,MMMM             MMMM    MMS   MM   MMMZ    MMMM   MMM     MMS  .MM   MMMZ    @MM.      MMM       MMMM    WMM@   0MM      2M   ZMMM      :MMMa    MMM7      
  iMMMMMM@            XMMM   .MM  XMM   aMMM     MMM:    MMW   .MM  XM@   ZMMM     MM0      aMMX      8MMM    .MMM    WMM     ZMr   MMMX      MMM8    0MMS       
 SMMMMi                MMM,  rMM,MM2    MMM:    SMMM     ;MM2  ;MM,MMS    MMM,    MMM       MMM       MMM.    MMM     .MM    MMZ    MMM      XMMM    rMMB        
 :MMM7                 MM@    BMMM      aMM     ;MMX      aMMX  8MMM      ZMM     MM8      .MMX      MMM2    iMMX      ,MMMMMMZ     .@;      MMM     WMM         
    .                  .:                         :        0MMZ                                      .2Z                  :7r.                ;i                 
                                                            0MMMaSMi                                                                                             
                                                             aMMMM7                                                                                              
                                                              .WW                                                                                                
                                                                                                                                                                 
Nakamichi 'Ryuugan-ditto-1TB', written by Kaze, inspired by Haruhiko Okumura sharing, based on Nobuo Ito's LZSS source, muffinesque tips by m^2, Jim Dempsey and Kirill Kryukov enforced.
This latest (2021-Mar-12) compile has B-trees only matchfinder - called 'LITE'; Downloadable at: https://twitter.com/Sanmayce

Nakamichi 'Kaidanji' SUPRALITE highlights:

- Back to supersimplisticism - 'Kaidanji' returns refined. Simply, ripping only orders 4..16 and then quickly trying to expand the match in the found position.

Nakamichi 'Ryuugan-ditto-1TB'/'Dragoneye' LITE highlights:

- The Zennish LZSS Microdeduplicator, a texttoy (file-to-file [de]compressor) written in plain C, 100% FREE - licenseless it is;
- Single-threaded Non-SIMD console tool written entirely by yours truly Sanmayce;
- The first Lempel-Ziv-Storer-Szymanski (LZSS) compressor using 1TB sliding window;
- It targets superfast decompression of huge/tera corpora of textual data;

- LITE means no memmem() (Railgun) invocations are to be made, nah, back to minimalistic Railgun since 2021-Mar-12;
- Compressing at Linear Rate due to Matchfinding based on B-trees only;
- The Leprechaunesque (Internal/External) B-trees order 3 (2 keys MAX) are brutally-optimized;

- Ability to deduplicate (as little as) 64 bytes long chunks 1TB backwards;
- Ability to deduplicate 256[+] bytes long chunks 1TB backwards - when SHA3 enabled;

- CHUNKABLE! Since there are no headers/metadata in .Nakamichi files, arbitrary chunks/blocks can be compressed-n-concatenated;

- SCALABLE! Gets faster when more Physical or/and External RAM is available;
- Dynamical (as command line parameters) selection of HASH & B-trees memory blocks;
- AUTO-RESETTING PASSES (when TargetBuffer is filled then automaticaly restart building by doubling the passes);
- DEFRAGMENTED B-trees are in use during compression stage, their leaves contain only BBs appearing 2[+] times;

- Compileable under Windows and Linux, most suitable to run on 3TB machines;
- Many thanks go to: Haruhiko Okumura, Nobuo Ito, Hamid Buzidi, Landon Noll, Aleksey Vaneev (https://github.com/avaneev/prvhash).

Sanmayce, Nakamichi's author, here, some more notes:

- The B-trees form the second layer, the first being HASH table handled by FNV1A-Pippip - the fastest lookup-hash;
- Hashpot a.k.a. hashpools (residing in Physical RAM) could be tuned via command line parameter, thus lessening the B-trees heights;
- The building of B-trees is done dynamically-n-automatically in PASSES, thus LOCALITY/LOCALIZATION leads to cache-friendliness, for example, instead of confusing/blinding
  the SSD controller with building 2^27 ~= 128M B-trees at a time, 'PASSES' revision lowers the "noise/mayhem" 128 times by processing e.g. (20bit) 1M B-trees at a time;

- For so long, the main goal was to throw it in battle, thus to forge one battle-ready *nix/windows tool with superb hash/search/decompress capabilities.
- Straight up, a wish of mine is to have the latest English Wikipedia XML dump decompressed by Nakamichi into physical RAM and then followed by Kazahana's superfast exact/wildcard/fuzzy etudes.
- Through the years, such a transparent decompressor (load booster) has been losing momentum and kinda became unnecessary, but not for me, when HDDs had 40MB/s sequential read speeds it was ...
  boosty, now with SSDs reading at 1700+MB/s, not so smacky, yet uploading (on 128GB machines, 20GB+72GB needed) the whole Wikipedia ~20GB (instead of 72GB) is better, sizewise.

- Currently, having 16 (4,6,8,10,12,14,16,18,36,64,24,28,48,56,128,256) MatchLens being hashed (plus 1 being phantomic/temporary), 29bit hashtable results in: (16+1)*8*(2^29) = (16+1)*8*(1<<29) =
  69632MB hashpot (the cluster of all hashpools), each slot houses a QWORD (being an offset/address of a B-tree root).
- In near future, wanna see a machine (256GB RAM) crunching the 77,265,813,300 bytes file with this command line (it requires 2x72GB + 68GB + 2930GB = 212GB physical RAM + 2.9TB SSD RAM):
  D:\>timer64 Nakamichi.exe enwiki-20200420-pages-articles.xml enwiki-20200420-pages-articles.xml.Nakamichi 29 3000000 e
- In not so far future, wanna see a machine (4096GB RAM) crunching the 72GB file with this command line (it requires 2x72GB + 272GB + 2930GB = 3.3TB physical RAM):
  D:\>timer64 Nakamichi.exe enwiki-20200420-pages-articles.xml enwiki-20200420-pages-articles.xml.Nakamichi 31 3000000 i

Q: - HOW TO BOOST [BUILDING/COMPRESSION] SPEED?
A: - Now, the name of the game is "RAM in spades", if we have a lot then speed is going to jump a lot. How?
- First, by increasing the hash-pool - 20 (number of bits) was used in 'Taishukan' resulting in 2^20 =~ 1M hash-slots a.k.a. B-trees' roots per keysize, naturally, the bigger the faster since B-trees will
  have less height and will be more - aiming to reach the ideal case - having only hash-slots with no actual B-trees! Back to 'Taishukan', the testfile is ~77MB, it suggests using 128M slots to lower 
  height/branching of B-trees - 2^27 leads to using 27. Feartime, going from 20 to 27: 8*(15+1)*2^(20) = 134,217,793 bytes; with the speed-up hash needs 8*(15+1)*2^(27) = 17,179,869,184 bytes, yes 16GB.
- Second, by lowering passes in building the B-trees - the trick is to increase the number in compile-time parameter -DSpeedUpBuilding=32 - (didn't make it as an execute-time parameter, lazy).
  If we look at the 'Taishukan' console log it tells us that (Target-Buffer 106 MB) x 64 passes = 6784MB are needed for building the B-trees in ONE PASS ONLY, so compile with -DSpeedUpBuilding=6784 instead.

Enfun!

Allocating Source-Buffer 12 MB ... 
Allocating Target-Buffer 5,120 MB ... 
Decompressing 13,384,856 bytes (being the compressed stream) ...
Warming up ...
RAM-to-RAM performance:
7318 MB/s; 7319 MB/s; 7273 MB/s; 7324 MB/s; 7325 MB/s; 7322 MB/s; 7334 MB/s; 7333 MB/s; 7328 MB/s; 7328 MB/s; 7329 MB/s; 7331 MB/s; 7334 MB/s; 7335 MB/s; 7334 MB/s; 7334 MB/s
Enforcing 17 seconds idling to avoid throttling ...
7327 MB/s; 7322 MB/s; 7322 MB/s; 7325 MB/s; 7325 MB/s; 7323 MB/s; 7323 MB/s; 7323 MB/s; 7323 MB/s; 7322 MB/s; 7323 MB/s; 7322 MB/s; 7320 MB/s; 7320 MB/s; 7324 MB/s; 7323 MB/s
Enforcing 17 seconds idling to avoid throttling ...
7325 MB/s; 7332 MB/s; 7325 MB/s; 7326 MB/s; 7326 MB/s; 7325 MB/s; 7322 MB/s; 7323 MB/s; 7322 MB/s; 7324 MB/s; 7324 MB/s; 7314 MB/s; 7249 MB/s; 7284 MB/s; 7282 MB/s; 7281 MB/s
Enforcing 17 seconds idling to avoid throttling ...
RAM-to-RAM (peak) performance: 7335 MB/s.
Source-file-Hash(FNV1A_YoshimitsuTRIAD) = 0x0f30,a09c
Target-file-Hash(FNV1A_YoshimitsuTRIAD) = 0xc552,41ea
	Command being timed: "./Nakamichi_DD-192.elf coronavirus.unwrapped.fasta.Nakamichi"
	User time (seconds): 0.24
	System time (seconds): 0.35
	Percent of CPU this job got: 99%
	Elapsed (wall clock) time (h:mm:ss or m:ss): 0:00.60
	Average shared text size (kbytes): 0
	Average unshared data size (kbytes): 0
	Average stack size (kbytes): 0
	Average total size (kbytes): 0
	Maximum resident set size (kbytes): 1300748
	Average resident set size (kbytes): 0
	Major (requiring I/O) page faults: 0
	Minor (reclaiming a frame) page faults: 325091
	Voluntary context switches: 1
	Involuntary context switches: 7
	Swaps: 0
	File system inputs: 0
	File system outputs: 0
	Socket messages sent: 0
	Socket messages received: 0
	Signals delivered: 0
	Page size (bytes): 4096
	Exit status: 0

 Performance counter stats for './Nakamichi_DD-192.elf coronavirus.unwrapped.fasta.Nakamichi':

            610.38 msec task-clock:u              #    0.999 CPUs utilized          
                 0      context-switches:u        #    0.000 K/sec                  
                 0      cpu-migrations:u          #    0.000 K/sec                  
           321,814      page-faults:u             #    0.527 M/sec                  
       542,019,588      cycles:u                  #    0.888 GHz                      (49.82%)
       124,853,158      instructions:u            #    0.23  insn per cycle           (62.43%)
        19,484,885      branches:u                #   31.923 M/sec                    (62.57%)
           952,210      branch-misses:u           #    4.89% of all branches          (62.65%)
        18,345,350      L1-dcache-loads:u         #   30.056 M/sec                    (62.65%)
        22,940,705      L1-dcache-load-misses:u   #  125.05% of all L1-dcache accesses  (62.63%)
         6,288,199      LLC-loads:u               #   10.302 M/sec                    (49.87%)
         1,211,018      LLC-load-misses:u         #   19.26% of all LL-cache accesses  (49.80%)

       0.611108862 seconds time elapsed

       0.250838000 seconds user
       0.352871000 seconds sys


-rw-r--r--. 1 kaze kaze 1317937667 Feb 16 11:05 coronavirus.unwrapped.fasta
-rw-rw-r--. 1 kaze kaze   13384856 Mar 15 10:55 coronavirus.unwrapped.fasta.Nakamichi
-rw-rw-r--. 1 kaze kaze 1317937667 Mar 15 10:55 coronavirus.unwrapped.fasta.NKMCH
[kaze@kaze Nakamichi_2021-Mar-12]$ 






[kaze@kaze Nakamichi_2021-Mar-12]$ zramctl 
NAME       ALGORITHM DISKSIZE DATA COMPR TOTAL STREAMS MOUNTPOINT
/dev/zram0 lzo-rle     140.6G   4K   75B   12K       4 [SWAP]
[kaze@kaze Nakamichi_2021-Mar-12]$ ls  -l
total 6085120
-rwxr-xr-x. 1 kaze kaze     772448 Mar 14 22:56  brotli
-rwxr-xr-x. 1 kaze kaze        158 Mar 14 23:58  BROTLIify.sh
-rw-r--r--. 1 kaze kaze        114 Mar 13 17:29  BZIP2ify.sh
-rw-r--r--. 1 kaze kaze      48438 Mar 15 00:14  Compressionette.txt
-rw-r--r--. 1 kaze kaze 1317937667 Feb 16 11:05  coronavirus.unwrapped.fasta
-rwxrwxrwx. 1 kaze kaze  100000000 Mar 28  2019  enwik8
-rwxrwxrwx. 1 kaze kaze   29008758 Mar 28  2019  enwik8.bz2
-rwxrwxrwx. 1 kaze kaze   25328049 Mar 28  2019  enwik8.L22W2GB.zst
-rw-r-----. 1 kaze kaze   21274371 Mar 15 03:22  enwik8.zv
-rwxrwxrwx. 1 kaze kaze 1000000000 Mar 28  2019  enwik9
-rw-rw-r--. 1 kaze kaze         47 Mar 14 22:00  enwik9.NKMCH
-rwxr-xr-x. 1 kaze kaze  226877440 Jan 25 09:28  glibc-2.32.tar
-rwxr-xr-x. 1 kaze kaze   23982240 Jan 25 09:28  glibc-2.32.tar.bz2
-rwxr-xr-x. 1 kaze kaze 1064366080 Mar 10 10:32  linux-5.11.5.tar
-rw-r--r--. 1 kaze kaze      55397 Mar 13 06:17  lzsse2.cpp
-rw-r--r--. 1 kaze kaze       4858 Mar 13 06:17  lzsse2.h
-rw-r--r--. 1 kaze kaze       2481 Mar 13 06:17  lzsse2_platform.h
-rw-r--r--. 1 kaze kaze      71964 Mar 13 06:17  LZSS-master.zip
-rw-r--r--. 1 kaze kaze       2137 Mar 13 06:17  _MakeELF_Nakamichi_GCC.sh
-rw-r--r--. 1 kaze kaze       2428 Mar 13 06:17  _MakeEXE_Nakamichi_GCC.bat
-rw-r--r--. 1 kaze kaze       3010 Mar 13 06:17  _MakeEXE_Nakamichi_ICL.bat
-rw-r--r--. 1 kaze kaze       1633 Mar 13 06:17 'MokujIN Amber 217 prompt.lnk'
-rw-r--r--. 1 kaze kaze      75776 Mar 13 06:17  Nakamichi_DD-192_32bit.exe
-rw-r--r--. 1 kaze kaze      83968 Mar 13 06:17  Nakamichi_DD-192_64bit.exe
-rwxrwxr-x. 1 kaze kaze     857952 Mar 13 17:51  Nakamichi_DD-192.elf
-rwxrwxr-x. 1 kaze kaze     142336 Mar 13 17:51  Nakamichi_DD-192.exe
-rw-r--r--. 1 kaze kaze        559 Mar 13 06:17  Nakamichify_external-128GB.bat
-rw-r--r--. 1 kaze kaze        498 Mar 13 06:17  Nakamichify_internal-128GB.bat
-rw-r--r--. 1 kaze kaze        344 Mar 13 06:17  Nakamichify_internal-128GB.sh
-rw-r--r--. 1 kaze kaze        344 Mar 13 06:17  Nakamichify_internal-1TB.sh
-rw-r--r--. 1 kaze kaze        345 Mar 13 06:17  Nakamichify_internal-2TB.sh
-rwxrwxr-x. 1 kaze kaze     857952 Mar 13 17:51  Nakamichi_PRV-192.elf
-rwxrwxr-x. 1 kaze kaze     143360 Mar 13 17:51  Nakamichi_PRV-192.exe
-rw-rw-r--. 1 kaze kaze      47816 Mar 14 13:14  Nakamichi.ratio-graph.csv
-rw-r--r--. 1 kaze kaze    1490807 Mar 13 06:17  Nakamichi_Ryuugan-ditto-1TB_btree.c
-rwxrwxr-x. 1 kaze kaze     857952 Mar 13 17:51  Nakamichi_SHA3-192.elf
-rwxrwxr-x. 1 kaze kaze     142336 Mar 13 17:51  Nakamichi_SHA3-192.exe
-rw-r--r--. 1 kaze kaze       3485 Mar 13 06:17  prvhash42.h
-rw-rw-r--. 1 kaze kaze         65 Mar 15 03:29  qq
-rw-r--r--. 1 kaze kaze      49152 Mar 13 06:17  sha1sum.exe
drwx------. 2 kaze kaze       4096 Mar 15 03:22  stdout
-rw-rw-r--. 1 kaze kaze  524794368 Mar 13 17:49 'SUPRAPIG_The_Prague_Stringology_Club_(302-PostScript-files).tar'
-rw-rw-r--. 1 kaze kaze   62585595 Mar 13 17:49 'SUPRAPIG_The_Prague_Stringology_Club_(302-PostScript-files).tar.br'
-rw-rw-r--. 1 kaze kaze  140913297 Mar 13 17:49 'SUPRAPIG_The_Prague_Stringology_Club_(302-PostScript-files).tar.bz2'
-rw-rw-r--. 1 kaze kaze   65312720 Mar 13 17:49 'SUPRAPIG_The_Prague_Stringology_Club_(302-PostScript-files).tar.L22W2GB.zst'
-rwxr-xr-x. 1 kaze kaze   96311153 Mar 14 09:54 'SUPRAPIG_The_Prague_Stringology_Club_(302-PostScript-files).tar.Nakamichi'
-rw-rw-r--. 1 kaze kaze  524794368 Mar 14 09:54 'SUPRAPIG_The_Prague_Stringology_Club_(302-PostScript-files).tar.NKMCH'
-rw-r--r--. 1 kaze kaze       6144 Mar 13 06:17  timer64.exe
-rw-r--r--. 1 kaze kaze 1000000000 Dec 25 22:43  TS100.txt
-rwxr-xr-x. 1 kaze kaze    1823256 Mar 13 06:33  turbobwt.elf
-rw-r--r--. 1 kaze kaze        241 Mar 13 06:17  ZSTDify.sh
[kaze@kaze Nakamichi_2021-Mar-12]$ sh Nakamichify_internal-128GB.sh coronavirus.unwrapped.fasta 
0b58ebce92369603ea03c6e11fb966476a1ba133  coronavirus.unwrapped.fasta
                                                                                                                                                                 
                                                            SMMi                                                                               :MM2              
                                                           0MMMMM:                                                                            rMMMMMa            
                                                          ZMMM. 0Z                                                                           :MMM7 7B            
                                                         rMM@                                                                                MMM                 
         7                                               MMM                                                                                MMM.                 
       BMMMa XZ               :MM:                      MMM                                                                                XMMX                  
     XMSANMAYCE;             rMMMM                     rMM;                                                                                MM@                   
    WM0  2MMMMM             ZMMMM                      MMW                                                                                BMM                    
    :      MMMB           aMMMMW                      2MM                                                           :MM8                  MM7               8MMi 
            MMMZ           XMMM                       MMa                                                         .WMMM0                 @MM              rMMMMi 
            MMMMa           MM,                      aMM                                                          XMMB                   MM:              MMM2   
           @MXMMM7         0MM                       MMS                                                                                WMM                      
           MM  MMM,        MM7                      7MM                                                                                 MM:                      
          MMX  ;MMM       iMM         MMM8  .       MM8     MMS         MMMZ  .     iMBi    :MMMX      @MMa      WB:       XMMZ2aX     ZMM     MMM2     :M2      
         :MM    ZMMM      BM8       ;MMMMMaaMM     ,MM    XMM@MM      rMMMMM2aMM   XMMMM   SMMSMM.    MMXMMM    MMMM0     aMMMa@MMr    MMS   ;MM;MM8   XMMMM.    
         MMr     MMM0     MM       2MMW    MMM     0MM   ZMS 2MM.    aMMB    MMM  BM aMM  8Ma  MM   iMM  BMM   M7 MMZ    ;MMX   MMi   ;MM   ZMW  MM0  rM 7MM     
        ;MM       MMM7   iMM      ZMM2    0MMa     MMX  8M:  MMM    ZMMS    BMM2  7  MM8 ZMr  :MM  rMB   MM@     iMM     MMZ   iMM    WMW  BM2   MMX     @MM     
        MMi       ;MMM   0MS     2MM7    aMMM     ;MM .8Mi  MMM    aMM7    ZMMM      MM ;Mr   XMM iM8    MMa     0MM    BMM    MMM    MM: BMX   .MM      MM7     
       aMM         BMMM  MM     ;MMX    ZMMMZ     BM@ MMM    .    rMM7    ZMMMZ     :MM:MX    0MZ M8    XMM,     MMX    MM.    ;W:   rMM aMX    ZMM     7MM      
       MM           MMMi MM     MMZ    8M:MM      MM; MMM,        MMa    0M:MM      8MWM8     MMZM0     MMM     rMM    0MM           WMa,M2     MMS     MM8      
      @M0           :MMMXMa    MMM    WM XMB ;   :MM;M8MMM       MMM    @M XM0 ;    MMM@      MMMW      MMrZi   MMS    MMi           MMZM0     rMM Mi   MM :     
     ;MM             BMMMM:   rMM    MM  MMSMa   ZMMM@ iMMr     7MM    MM  MMXM2   :MMM      ZMMM      8MM@@    MMZ0  7MM       ,   :MMMM      MMBMa   0MWBr     
    ,MMMM             MMMM    MMS   MM   MMMZ    MMMM   MMM     MMS  .MM   MMMZ    @MM.      MMM       MMMM    WMM@   0MM      2M   ZMMM      :MMMa    MMM7      
  iMMMMMM@            XMMM   .MM  XMM   aMMM     MMM:    MMW   .MM  XM@   ZMMM     MM0      aMMX      8MMM    .MMM    WMM     ZMr   MMMX      MMM8    0MMS       
 SMMMMi                MMM,  rMM,MM2    MMM:    SMMM     ;MM2  ;MM,MMS    MMM,    MMM       MMM       MMM.    MMM     .MM    MMZ    MMM      XMMM    rMMB        
 :MMM7                 MM@    BMMM      aMM     ;MMX      aMMX  8MMM      ZMM     MM8      .MMX      MMM2    iMMX      ,MMMMMMZ     .@;      MMM     WMM         
    .                  .:                         :        0MMZ                                      .2Z                  :7r.                ;i                 
                                                            0MMMaSMi                                                                                             
                                                             aMMMM7                                                                                              
                                                              .WW                                                                                                
                                                                                                                                                                 
Nakamichi 'Ryuugan-ditto-1TB', written by Kaze, inspired by Haruhiko Okumura sharing, based on Nobuo Ito's LZSS source, muffinesque tips by m^2, Jim Dempsey and Kirill Kryukov enforced.
This latest (2021-Mar-12) compile has B-trees only matchfinder - called 'LITE'; Downloadable at: https://twitter.com/Sanmayce

Nakamichi 'Kaidanji' SUPRALITE highlights:

- Back to supersimplisticism - 'Kaidanji' returns refined. Simply, ripping only orders 4..16 and then quickly trying to expand the match in the found position.

Nakamichi 'Ryuugan-ditto-1TB'/'Dragoneye' LITE highlights:

- The Zennish LZSS Microdeduplicator, a texttoy (file-to-file [de]compressor) written in plain C, 100% FREE - licenseless it is;
- Single-threaded Non-SIMD console tool written entirely by yours truly Sanmayce;
- The first Lempel-Ziv-Storer-Szymanski (LZSS) compressor using 1TB sliding window;
- It targets superfast decompression of huge/tera corpora of textual data;

- LITE means no memmem() (Railgun) invocations are to be made, nah, back to minimalistic Railgun since 2021-Mar-12;
- Compressing at Linear Rate due to Matchfinding based on B-trees only;
- The Leprechaunesque (Internal/External) B-trees order 3 (2 keys MAX) are brutally-optimized;

- Ability to deduplicate (as little as) 64 bytes long chunks 1TB backwards;
- Ability to deduplicate 256[+] bytes long chunks 1TB backwards - when SHA3 enabled;

- CHUNKABLE! Since there are no headers/metadata in .Nakamichi files, arbitrary chunks/blocks can be compressed-n-concatenated;

- SCALABLE! Gets faster when more Physical or/and External RAM is available;
- Dynamical (as command line parameters) selection of HASH & B-trees memory blocks;
- AUTO-RESETTING PASSES (when TargetBuffer is filled then automaticaly restart building by doubling the passes);
- DEFRAGMENTED B-trees are in use during compression stage, their leaves contain only BBs appearing 2[+] times;

- Compileable under Windows and Linux, most suitable to run on 3TB machines;
- Many thanks go to: Haruhiko Okumura, Nobuo Ito, Hamid Buzidi, Landon Noll, Aleksey Vaneev (https://github.com/avaneev/prvhash).

Sanmayce, Nakamichi's author, here, some more notes:

- The B-trees form the second layer, the first being HASH table handled by FNV1A-Pippip - the fastest lookup-hash;
- Hashpot a.k.a. hashpools (residing in Physical RAM) could be tuned via command line parameter, thus lessening the B-trees heights;
- The building of B-trees is done dynamically-n-automatically in PASSES, thus LOCALITY/LOCALIZATION leads to cache-friendliness, for example, instead of confusing/blinding
  the SSD controller with building 2^27 ~= 128M B-trees at a time, 'PASSES' revision lowers the "noise/mayhem" 128 times by processing e.g. (20bit) 1M B-trees at a time;

- For so long, the main goal was to throw it in battle, thus to forge one battle-ready *nix/windows tool with superb hash/search/decompress capabilities.
- Straight up, a wish of mine is to have the latest English Wikipedia XML dump decompressed by Nakamichi into physical RAM and then followed by Kazahana's superfast exact/wildcard/fuzzy etudes.
- Through the years, such a transparent decompressor (load booster) has been losing momentum and kinda became unnecessary, but not for me, when HDDs had 40MB/s sequential read speeds it was ...
  boosty, now with SSDs reading at 1700+MB/s, not so smacky, yet uploading (on 128GB machines, 20GB+72GB needed) the whole Wikipedia ~20GB (instead of 72GB) is better, sizewise.

- Currently, having 16 (4,6,8,10,12,14,16,18,36,64,24,28,48,56,128,256) MatchLens being hashed (plus 1 being phantomic/temporary), 29bit hashtable results in: (16+1)*8*(2^29) = (16+1)*8*(1<<29) =
  69632MB hashpot (the cluster of all hashpools), each slot houses a QWORD (being an offset/address of a B-tree root).
- In near future, wanna see a machine (256GB RAM) crunching the 77,265,813,300 bytes file with this command line (it requires 2x72GB + 68GB + 2930GB = 212GB physical RAM + 2.9TB SSD RAM):
  D:\>timer64 Nakamichi.exe enwiki-20200420-pages-articles.xml enwiki-20200420-pages-articles.xml.Nakamichi 29 3000000 e
- In not so far future, wanna see a machine (4096GB RAM) crunching the 72GB file with this command line (it requires 2x72GB + 272GB + 2930GB = 3.3TB physical RAM):
  D:\>timer64 Nakamichi.exe enwiki-20200420-pages-articles.xml enwiki-20200420-pages-articles.xml.Nakamichi 31 3000000 i

Q: - HOW TO BOOST [BUILDING/COMPRESSION] SPEED?
A: - Now, the name of the game is "RAM in spades", if we have a lot then speed is going to jump a lot. How?
- First, by increasing the hash-pool - 20 (number of bits) was used in 'Taishukan' resulting in 2^20 =~ 1M hash-slots a.k.a. B-trees' roots per keysize, naturally, the bigger the faster since B-trees will
  have less height and will be more - aiming to reach the ideal case - having only hash-slots with no actual B-trees! Back to 'Taishukan', the testfile is ~77MB, it suggests using 128M slots to lower 
  height/branching of B-trees - 2^27 leads to using 27. Feartime, going from 20 to 27: 8*(15+1)*2^(20) = 134,217,793 bytes; with the speed-up hash needs 8*(15+1)*2^(27) = 17,179,869,184 bytes, yes 16GB.
- Second, by lowering passes in building the B-trees - the trick is to increase the number in compile-time parameter -DSpeedUpBuilding=32 - (didn't make it as an execute-time parameter, lazy).
  If we look at the 'Taishukan' console log it tells us that (Target-Buffer 106 MB) x 64 passes = 6784MB are needed for building the B-trees in ONE PASS ONLY, so compile with -DSpeedUpBuilding=6784 instead.

Enfun!

This compile uses B-trees only, no memmem() invocations - it compresses worse but much faster.
Allocating Source-Buffer 1,256 MB ... 
Allocating Target-Buffer 1,576 MB ... 
Source-file-Hash(FNV1A_YoshimitsuTRIAD) = 0xc552,41ea
Leprechaun: Memory pool for B-trees is 123,000 MB.
Leprechaun: In this revision 512MB 16-way hash is used which results in 16 x 67,108,864 internal B-Trees of order 3.
Leprechaun: Allocating HASH memory 9,126,805,569 bytes = 8*(16+1)*2^(26) ... OK
Leprechaun: Allocating memory for B-trees 123001 MB ... OK
Leprechaun: Size of input file: 1,317,937,667

Leprechaun: Using (first 24 bytes of) DoubleDeuce (a.k.a. 3x2x4B=24B: 2xCastagnoli, 2xKoopman, 2xKoopman2) for Matches 24+ long, in order to reduce memory footprint.
Leprechaun: Inserting keys/BBs of order 004 into B-trees, free RAM in B-tree pool is 00,123,000 MB; Pass #000,001 of 000,001 ... DONE; 00,000,015,333 DEFRAGMENTED B-trees have been rooted so far.
            15,333 TotalNonUnique (of length 004) keys have been inserted into DEFRAGMENTED B-trees.
Leprechaun: Inserting keys/BBs of order 006 into B-trees, free RAM in B-tree pool is 00,122,999 MB; Pass #000,001 of 000,001 ... DONE; 00,000,081,131 DEFRAGMENTED B-trees have been rooted so far.
            65,832 TotalNonUnique (of length 006) keys have been inserted into DEFRAGMENTED B-trees.
Leprechaun: Inserting keys/BBs of order 008 into B-trees, free RAM in B-tree pool is 00,122,995 MB; Pass #000,001 of 000,001 ... DONE; 00,000,277,725 DEFRAGMENTED B-trees have been rooted so far.
            196,894 TotalNonUnique (of length 008) keys have been inserted into DEFRAGMENTED B-trees.
Leprechaun: Inserting keys/BBs of order 010 into B-trees, free RAM in B-tree pool is 00,122,985 MB; Pass #000,001 of 000,001 ... DONE; 00,000,611,661 DEFRAGMENTED B-trees have been rooted so far.
            334,760 TotalNonUnique (of length 010) keys have been inserted into DEFRAGMENTED B-trees.
Leprechaun: Inserting keys/BBs of order 012 into B-trees, free RAM in B-tree pool is 00,122,965 MB; Pass #000,001 of 000,001 ... DONE; 00,001,026,325 DEFRAGMENTED B-trees have been rooted so far.
            415,990 TotalNonUnique (of length 012) keys have been inserted into DEFRAGMENTED B-trees.
Leprechaun: Inserting keys/BBs of order 014 into B-trees, free RAM in B-tree pool is 00,122,939 MB; Pass #000,001 of 000,001 ... DONE; 00,001,515,256 DEFRAGMENTED B-trees have been rooted so far.
            490,765 TotalNonUnique (of length 014) keys have been inserted into DEFRAGMENTED B-trees.
Leprechaun: Inserting keys/BBs of order 016 into B-trees, free RAM in B-tree pool is 00,122,906 MB; Pass #000,001 of 000,001 ... DONE; 00,002,075,597 DEFRAGMENTED B-trees have been rooted so far.
            562,732 TotalNonUnique (of length 016) keys have been inserted into DEFRAGMENTED B-trees.
Leprechaun: Inserting keys/BBs of order 018 into B-trees, free RAM in B-tree pool is 00,122,866 MB; Pass #000,001 of 000,001 ... DONE; 00,002,704,954 DEFRAGMENTED B-trees have been rooted so far.
            632,407 TotalNonUnique (of length 018) keys have been inserted into DEFRAGMENTED B-trees.
Leprechaun: Inserting keys/BBs of order 036 into B-trees, free RAM in B-tree pool is 00,122,820 MB; Pass #000,001 of 000,001 ... DONE; 00,003,889,072 DEFRAGMENTED B-trees have been rooted so far.
            1,194,663 TotalNonUnique (of length 036) keys have been inserted into DEFRAGMENTED B-trees.
Leprechaun: Inserting keys/BBs of order 064 into B-trees, free RAM in B-tree pool is 00,122,718 MB; Pass #000,001 of 000,001 ... DONE; 00,005,793,545 DEFRAGMENTED B-trees have been rooted so far.
            1,932,047 TotalNonUnique (of length 064) keys have been inserted into DEFRAGMENTED B-trees.
Leprechaun: Inserting keys/BBs of order 024 into B-trees, free RAM in B-tree pool is 00,122,555 MB; Pass #000,001 of 000,001 ... DONE; 00,006,619,268 DEFRAGMENTED B-trees have been rooted so far.
            831,466 TotalNonUnique (of length 024) keys have been inserted into DEFRAGMENTED B-trees.
Leprechaun: Inserting keys/BBs of order 028 into B-trees, free RAM in B-tree pool is 00,122,484 MB; Pass #000,001 of 000,001 ... DONE; 00,007,569,313 DEFRAGMENTED B-trees have been rooted so far.
            956,850 TotalNonUnique (of length 028) keys have been inserted into DEFRAGMENTED B-trees.
Leprechaun: Inserting keys/BBs of order 048 into B-trees, free RAM in B-tree pool is 00,122,402 MB; Pass #000,001 of 000,001 ... DONE; 00,009,079,092 DEFRAGMENTED B-trees have been rooted so far.
            1,526,965 TotalNonUnique (of length 048) keys have been inserted into DEFRAGMENTED B-trees.
Leprechaun: Inserting keys/BBs of order 056 into B-trees, free RAM in B-tree pool is 00,122,272 MB; Pass #000,001 of 000,001 ... DONE; 00,010,791,288 DEFRAGMENTED B-trees have been rooted so far.
            1,734,434 TotalNonUnique (of length 056) keys have been inserted into DEFRAGMENTED B-trees.
Leprechaun: Inserting keys/BBs of order 128 into B-trees, free RAM in B-tree pool is 00,122,125 MB; Pass #000,001 of 000,001 ... DONE; 00,014,013,480 DEFRAGMENTED B-trees have been rooted so far.
            3,302,025 TotalNonUnique (of length 128) keys have been inserted into DEFRAGMENTED B-trees.
Leprechaun: Inserting keys/BBs of order 256 into B-trees, free RAM in B-tree pool is 00,121,849 MB; Pass #000,001 of 000,001 ... 
Leprechaun: Failure! Increment 'Memory for B-trees'!
Automatically increasing number of passes in order to fit B-trees into Target Buffer.
Leprechaun: Inserting keys/BBs of order 256 into B-trees, free RAM in B-tree pool is 00,121,617 MB; Pass #000,002 of 000,002 ... DONE; 00,019,389,893 DEFRAGMENTED B-trees have been rooted so far.
            5,604,032 TotalNonUnique (of length 256) keys have been inserted into DEFRAGMENTED B-trees.

Histogram (rotate it 90 degrees clockwise) of Unique-Building-Blocks appearing 2[+] times (e.g. 'alfalfa-alfa' stream has 1 BB with length 4 appearing 3 times thus adding 1 to the count for {004]):
5,604,032{256]
3,302,025{128]
1,932,047{064]
1,734,434{056]
1,526,965{048]
1,194,663{036]
  956,850{028]
  831,466{024]
  632,407{018]
  562,732{016]
  490,765{014]
  415,990{012]
  334,760{010]
  196,894{008]
   65,832{006]
   15,333{004]

Leprechaun: Total Searches-n-Inserts Per Second: 2,760,865 SNIPS = 23,340,358,016 keys in 8,454 seconds
Leprechaun: RAM needed to house B-trees (relative to the file being ripped): 1N = 1,614MB
Leprechaun: RAM needed to build B-trees IN ONE PASS: (Target-Buffer = 1,576 MB) x 2 passes = 3,152MB
Note: In case of RAM in spades then may use compile option: -DSpeedUpBuilding=3152

Compressing 1,317,937,667 bytes ...
-; Each rotation means 64KB are encoded; Speed: 0,073,117 B/s; Done 100%; Compression Ratio: 98.46:1; Matches(16/24/48): 21,240/27,940/21,757; 128[+] long matches: 2,596,311; ETA: 0.00 hours  
NumberOfFullLiterals (lower-the-better): 112
RAM-to-RAM performance: 73117 B/s.
Compressed to 13,384,856 bytes.
Source-file-Hash(FNV1A_YoshimitsuTRIAD) = 0xc552,41ea
Target-file-Hash(FNV1A_YoshimitsuTRIAD) = 0x0f30,a09c
	Command being timed: "./Nakamichi_DD-192.elf coronavirus.unwrapped.fasta coronavirus.unwrapped.fasta.Nakamichi 26 123000 i"
	User time (seconds): 26418.44
	System time (seconds): 7.68
	Percent of CPU this job got: 99%
	Elapsed (wall clock) time (h:mm:ss or m:ss): 7:21:21
	Average shared text size (kbytes): 0
	Average unshared data size (kbytes): 0
	Average stack size (kbytes): 0
	Average total size (kbytes): 0
	Maximum resident set size (kbytes): 13467424
	Average resident set size (kbytes): 0
	Major (requiring I/O) page faults: 11
	Minor (reclaiming a frame) page faults: 3369921
	Voluntary context switches: 11
	Involuntary context switches: 358146
	Swaps: 0
	File system inputs: 1568
	File system outputs: 26640
	Socket messages sent: 0
	Socket messages received: 0
	Signals delivered: 0
	Page size (bytes): 4096
	Exit status: 0
0b58ebce92369603ea03c6e11fb966476a1ba133  coronavirus.unwrapped.fasta.NKMCH
                                                                                                                                                                 
                                                            SMMi                                                                               :MM2              
                                                           0MMMMM:                                                                            rMMMMMa            
                                                          ZMMM. 0Z                                                                           :MMM7 7B            
                                                         rMM@                                                                                MMM                 
         7                                               MMM                                                                                MMM.                 
       BMMMa XZ               :MM:                      MMM                                                                                XMMX                  
     XMSANMAYCE;             rMMMM                     rMM;                                                                                MM@                   
    WM0  2MMMMM             ZMMMM                      MMW                                                                                BMM                    
    :      MMMB           aMMMMW                      2MM                                                           :MM8                  MM7               8MMi 
            MMMZ           XMMM                       MMa                                                         .WMMM0                 @MM              rMMMMi 
            MMMMa           MM,                      aMM                                                          XMMB                   MM:              MMM2   
           @MXMMM7         0MM                       MMS                                                                                WMM                      
           MM  MMM,        MM7                      7MM                                                                                 MM:                      
          MMX  ;MMM       iMM         MMM8  .       MM8     MMS         MMMZ  .     iMBi    :MMMX      @MMa      WB:       XMMZ2aX     ZMM     MMM2     :M2      
         :MM    ZMMM      BM8       ;MMMMMaaMM     ,MM    XMM@MM      rMMMMM2aMM   XMMMM   SMMSMM.    MMXMMM    MMMM0     aMMMa@MMr    MMS   ;MM;MM8   XMMMM.    
         MMr     MMM0     MM       2MMW    MMM     0MM   ZMS 2MM.    aMMB    MMM  BM aMM  8Ma  MM   iMM  BMM   M7 MMZ    ;MMX   MMi   ;MM   ZMW  MM0  rM 7MM     
        ;MM       MMM7   iMM      ZMM2    0MMa     MMX  8M:  MMM    ZMMS    BMM2  7  MM8 ZMr  :MM  rMB   MM@     iMM     MMZ   iMM    WMW  BM2   MMX     @MM     
        MMi       ;MMM   0MS     2MM7    aMMM     ;MM .8Mi  MMM    aMM7    ZMMM      MM ;Mr   XMM iM8    MMa     0MM    BMM    MMM    MM: BMX   .MM      MM7     
       aMM         BMMM  MM     ;MMX    ZMMMZ     BM@ MMM    .    rMM7    ZMMMZ     :MM:MX    0MZ M8    XMM,     MMX    MM.    ;W:   rMM aMX    ZMM     7MM      
       MM           MMMi MM     MMZ    8M:MM      MM; MMM,        MMa    0M:MM      8MWM8     MMZM0     MMM     rMM    0MM           WMa,M2     MMS     MM8      
      @M0           :MMMXMa    MMM    WM XMB ;   :MM;M8MMM       MMM    @M XM0 ;    MMM@      MMMW      MMrZi   MMS    MMi           MMZM0     rMM Mi   MM :     
     ;MM             BMMMM:   rMM    MM  MMSMa   ZMMM@ iMMr     7MM    MM  MMXM2   :MMM      ZMMM      8MM@@    MMZ0  7MM       ,   :MMMM      MMBMa   0MWBr     
    ,MMMM             MMMM    MMS   MM   MMMZ    MMMM   MMM     MMS  .MM   MMMZ    @MM.      MMM       MMMM    WMM@   0MM      2M   ZMMM      :MMMa    MMM7      
  iMMMMMM@            XMMM   .MM  XMM   aMMM     MMM:    MMW   .MM  XM@   ZMMM     MM0      aMMX      8MMM    .MMM    WMM     ZMr   MMMX      MMM8    0MMS       
 SMMMMi                MMM,  rMM,MM2    MMM:    SMMM     ;MM2  ;MM,MMS    MMM,    MMM       MMM       MMM.    MMM     .MM    MMZ    MMM      XMMM    rMMB        
 :MMM7                 MM@    BMMM      aMM     ;MMX      aMMX  8MMM      ZMM     MM8      .MMX      MMM2    iMMX      ,MMMMMMZ     .@;      MMM     WMM         
    .                  .:                         :        0MMZ                                      .2Z                  :7r.                ;i                 
                                                            0MMMaSMi                                                                                             
                                                             aMMMM7                                                                                              
                                                              .WW                                                                                                
                                                                                                                                                                 
Nakamichi 'Ryuugan-ditto-1TB', written by Kaze, inspired by Haruhiko Okumura sharing, based on Nobuo Ito's LZSS source, muffinesque tips by m^2, Jim Dempsey and Kirill Kryukov enforced.
This latest (2021-Mar-12) compile has B-trees only matchfinder - called 'LITE'; Downloadable at: https://twitter.com/Sanmayce

Nakamichi 'Kaidanji' SUPRALITE highlights:

- Back to supersimplisticism - 'Kaidanji' returns refined. Simply, ripping only orders 4..16 and then quickly trying to expand the match in the found position.

Nakamichi 'Ryuugan-ditto-1TB'/'Dragoneye' LITE highlights:

- The Zennish LZSS Microdeduplicator, a texttoy (file-to-file [de]compressor) written in plain C, 100% FREE - licenseless it is;
- Single-threaded Non-SIMD console tool written entirely by yours truly Sanmayce;
- The first Lempel-Ziv-Storer-Szymanski (LZSS) compressor using 1TB sliding window;
- It targets superfast decompression of huge/tera corpora of textual data;

- LITE means no memmem() (Railgun) invocations are to be made, nah, back to minimalistic Railgun since 2021-Mar-12;
- Compressing at Linear Rate due to Matchfinding based on B-trees only;
- The Leprechaunesque (Internal/External) B-trees order 3 (2 keys MAX) are brutally-optimized;

- Ability to deduplicate (as little as) 64 bytes long chunks 1TB backwards;
- Ability to deduplicate 256[+] bytes long chunks 1TB backwards - when SHA3 enabled;

- CHUNKABLE! Since there are no headers/metadata in .Nakamichi files, arbitrary chunks/blocks can be compressed-n-concatenated;

- SCALABLE! Gets faster when more Physical or/and External RAM is available;
- Dynamical (as command line parameters) selection of HASH & B-trees memory blocks;
- AUTO-RESETTING PASSES (when TargetBuffer is filled then automaticaly restart building by doubling the passes);
- DEFRAGMENTED B-trees are in use during compression stage, their leaves contain only BBs appearing 2[+] times;

- Compileable under Windows and Linux, most suitable to run on 3TB machines;
- Many thanks go to: Haruhiko Okumura, Nobuo Ito, Hamid Buzidi, Landon Noll, Aleksey Vaneev (https://github.com/avaneev/prvhash).

Sanmayce, Nakamichi's author, here, some more notes:

- The B-trees form the second layer, the first being HASH table handled by FNV1A-Pippip - the fastest lookup-hash;
- Hashpot a.k.a. hashpools (residing in Physical RAM) could be tuned via command line parameter, thus lessening the B-trees heights;
- The building of B-trees is done dynamically-n-automatically in PASSES, thus LOCALITY/LOCALIZATION leads to cache-friendliness, for example, instead of confusing/blinding
  the SSD controller with building 2^27 ~= 128M B-trees at a time, 'PASSES' revision lowers the "noise/mayhem" 128 times by processing e.g. (20bit) 1M B-trees at a time;

- For so long, the main goal was to throw it in battle, thus to forge one battle-ready *nix/windows tool with superb hash/search/decompress capabilities.
- Straight up, a wish of mine is to have the latest English Wikipedia XML dump decompressed by Nakamichi into physical RAM and then followed by Kazahana's superfast exact/wildcard/fuzzy etudes.
- Through the years, such a transparent decompressor (load booster) has been losing momentum and kinda became unnecessary, but not for me, when HDDs had 40MB/s sequential read speeds it was ...
  boosty, now with SSDs reading at 1700+MB/s, not so smacky, yet uploading (on 128GB machines, 20GB+72GB needed) the whole Wikipedia ~20GB (instead of 72GB) is better, sizewise.

- Currently, having 16 (4,6,8,10,12,14,16,18,36,64,24,28,48,56,128,256) MatchLens being hashed (plus 1 being phantomic/temporary), 29bit hashtable results in: (16+1)*8*(2^29) = (16+1)*8*(1<<29) =
  69632MB hashpot (the cluster of all hashpools), each slot houses a QWORD (being an offset/address of a B-tree root).
- In near future, wanna see a machine (256GB RAM) crunching the 77,265,813,300 bytes file with this command line (it requires 2x72GB + 68GB + 2930GB = 212GB physical RAM + 2.9TB SSD RAM):
  D:\>timer64 Nakamichi.exe enwiki-20200420-pages-articles.xml enwiki-20200420-pages-articles.xml.Nakamichi 29 3000000 e
- In not so far future, wanna see a machine (4096GB RAM) crunching the 72GB file with this command line (it requires 2x72GB + 272GB + 2930GB = 3.3TB physical RAM):
  D:\>timer64 Nakamichi.exe enwiki-20200420-pages-articles.xml enwiki-20200420-pages-articles.xml.Nakamichi 31 3000000 i

Q: - HOW TO BOOST [BUILDING/COMPRESSION] SPEED?
A: - Now, the name of the game is "RAM in spades", if we have a lot then speed is going to jump a lot. How?
- First, by increasing the hash-pool - 20 (number of bits) was used in 'Taishukan' resulting in 2^20 =~ 1M hash-slots a.k.a. B-trees' roots per keysize, naturally, the bigger the faster since B-trees will
  have less height and will be more - aiming to reach the ideal case - having only hash-slots with no actual B-trees! Back to 'Taishukan', the testfile is ~77MB, it suggests using 128M slots to lower 
  height/branching of B-trees - 2^27 leads to using 27. Feartime, going from 20 to 27: 8*(15+1)*2^(20) = 134,217,793 bytes; with the speed-up hash needs 8*(15+1)*2^(27) = 17,179,869,184 bytes, yes 16GB.
- Second, by lowering passes in building the B-trees - the trick is to increase the number in compile-time parameter -DSpeedUpBuilding=32 - (didn't make it as an execute-time parameter, lazy).
  If we look at the 'Taishukan' console log it tells us that (Target-Buffer 106 MB) x 64 passes = 6784MB are needed for building the B-trees in ONE PASS ONLY, so compile with -DSpeedUpBuilding=6784 instead.

Enfun!

Allocating Source-Buffer 12 MB ... 
Allocating Target-Buffer 5,120 MB ... 
Decompressing 13,384,856 bytes (being the compressed stream) ...
Warming up ...
RAM-to-RAM performance:
7318 MB/s; 7319 MB/s; 7273 MB/s; 7324 MB/s; 7325 MB/s; 7322 MB/s; 7334 MB/s; 7333 MB/s; 7328 MB/s; 7328 MB/s; 7329 MB/s; 7331 MB/s; 7334 MB/s; 7335 MB/s; 7334 MB/s; 7334 MB/s
Enforcing 17 seconds idling to avoid throttling ...
7327 MB/s; 7322 MB/s; 7322 MB/s; 7325 MB/s; 7325 MB/s; 7323 MB/s; 7323 MB/s; 7323 MB/s; 7323 MB/s; 7322 MB/s; 7323 MB/s; 7322 MB/s; 7320 MB/s; 7320 MB/s; 7324 MB/s; 7323 MB/s
Enforcing 17 seconds idling to avoid throttling ...
7325 MB/s; 7332 MB/s; 7325 MB/s; 7326 MB/s; 7326 MB/s; 7325 MB/s; 7322 MB/s; 7323 MB/s; 7322 MB/s; 7324 MB/s; 7324 MB/s; 7314 MB/s; 7249 MB/s; 7284 MB/s; 7282 MB/s; 7281 MB/s
Enforcing 17 seconds idling to avoid throttling ...
RAM-to-RAM (peak) performance: 7335 MB/s.
Source-file-Hash(FNV1A_YoshimitsuTRIAD) = 0x0f30,a09c
Target-file-Hash(FNV1A_YoshimitsuTRIAD) = 0xc552,41ea
	Command being timed: "./Nakamichi_DD-192.elf coronavirus.unwrapped.fasta.Nakamichi"
	User time (seconds): 0.24
	System time (seconds): 0.35
	Percent of CPU this job got: 99%
	Elapsed (wall clock) time (h:mm:ss or m:ss): 0:00.60
	Average shared text size (kbytes): 0
	Average unshared data size (kbytes): 0
	Average stack size (kbytes): 0
	Average total size (kbytes): 0
	Maximum resident set size (kbytes): 1300748
	Average resident set size (kbytes): 0
	Major (requiring I/O) page faults: 0
	Minor (reclaiming a frame) page faults: 325091
	Voluntary context switches: 1
	Involuntary context switches: 7
	Swaps: 0
	File system inputs: 0
	File system outputs: 0
	Socket messages sent: 0
	Socket messages received: 0
	Signals delivered: 0
	Page size (bytes): 4096
	Exit status: 0

 Performance counter stats for './Nakamichi_DD-192.elf coronavirus.unwrapped.fasta.Nakamichi':

            610.38 msec task-clock:u              #    0.999 CPUs utilized          
                 0      context-switches:u        #    0.000 K/sec                  
                 0      cpu-migrations:u          #    0.000 K/sec                  
           321,814      page-faults:u             #    0.527 M/sec                  
       542,019,588      cycles:u                  #    0.888 GHz                      (49.82%)
       124,853,158      instructions:u            #    0.23  insn per cycle           (62.43%)
        19,484,885      branches:u                #   31.923 M/sec                    (62.57%)
           952,210      branch-misses:u           #    4.89% of all branches          (62.65%)
        18,345,350      L1-dcache-loads:u         #   30.056 M/sec                    (62.65%)
        22,940,705      L1-dcache-load-misses:u   #  125.05% of all L1-dcache accesses  (62.63%)
         6,288,199      LLC-loads:u               #   10.302 M/sec                    (49.87%)
         1,211,018      LLC-load-misses:u         #   19.26% of all LL-cache accesses  (49.80%)

       0.611108862 seconds time elapsed

       0.250838000 seconds user
       0.352871000 seconds sys


-rw-r--r--. 1 kaze kaze 1317937667 Feb 16 11:05 coronavirus.unwrapped.fasta
-rw-rw-r--. 1 kaze kaze   13384856 Mar 15 10:55 coronavirus.unwrapped.fasta.Nakamichi
-rw-rw-r--. 1 kaze kaze 1317937667 Mar 15 10:55 coronavirus.unwrapped.fasta.NKMCH
[kaze@kaze Nakamichi_2021-Mar-12]$ pluma Compressionette.txt 
[kaze@kaze Nakamichi_2021-Mar-12]$ sh ZSTDify.sh coronavirus.unwrapped.fasta
0b58ebce92369603ea03c6e11fb966476a1ba133  coronavirus.unwrapped.fasta
*** zstd command line interface 64-bits v1.4.9, by Yann Collet ***
stdin is a console, aborting
rm: cannot remove 'coronavirus.unwrapped.fasta.L22W2GB.zst': No such file or directory
coronavirus.unwrapped.fasta :  0.13%   (1317937667 => 1756950 bytes, coronavirus.unwrapped.fasta.L22W2GB.zst) 
	Command being timed: "zstd --single-thread --ultra -22 --long=31 --zstd=wlog=31,clog=30,hlog=30,slog=26 coronavirus.unwrapped.fasta -o coronavirus.unwrapped.fasta.L22W2GB.zst"
	User time (seconds): 118.81
	System time (seconds): 3.53
	Percent of CPU this job got: 99%
	Elapsed (wall clock) time (h:mm:ss or m:ss): 2:02.66
	Average shared text size (kbytes): 0
	Average unshared data size (kbytes): 0
	Average stack size (kbytes): 0
	Average total size (kbytes): 0
	Maximum resident set size (kbytes): 9811800
	Average resident set size (kbytes): 0
	Major (requiring I/O) page faults: 2
	Minor (reclaiming a frame) page faults: 2452504
	Voluntary context switches: 5
	Involuntary context switches: 1778
	Swaps: 0
	File system inputs: 144
	File system outputs: 3432
	Socket messages sent: 0
	Socket messages received: 0
	Signals delivered: 0
	Page size (bytes): 4096
	Exit status: 0
coronavirus.unwrapped.fasta.L22W2GB.zst: 1317937667 bytes                      

 Performance counter stats for 'zstd -d --long=31 coronavirus.unwrapped.fasta.L22W2GB.zst -o /dev/null':

            803.79 msec task-clock:u              #    0.995 CPUs utilized          
                 0      context-switches:u        #    0.000 K/sec                  
                 0      cpu-migrations:u          #    0.000 K/sec                  
           321,889      page-faults:u             #    0.400 M/sec                  
     1,022,903,797      cycles:u                  #    1.273 GHz                      (49.85%)
     1,453,021,001      instructions:u            #    1.42  insn per cycle           (62.53%)
       101,922,520      branches:u                #  126.802 M/sec                    (62.69%)
         1,389,047      branch-misses:u           #    1.36% of all branches          (62.69%)
       283,459,982      L1-dcache-loads:u         #  352.654 M/sec                    (62.68%)
        86,942,159      L1-dcache-load-misses:u   #   30.67% of all L1-dcache accesses  (62.59%)
         6,896,084      LLC-loads:u               #    8.579 M/sec                    (49.75%)
         2,625,303      LLC-load-misses:u         #   38.07% of all LL-cache accesses  (49.75%)

       0.808055220 seconds time elapsed

       0.411856000 seconds user
       0.383351000 seconds sys


-rw-r--r--. 1 kaze kaze 1317937667 Feb 16 11:05 coronavirus.unwrapped.fasta
-rw-r--r--. 1 kaze kaze    1756950 Feb 16 11:05 coronavirus.unwrapped.fasta.L22W2GB.zst
-rw-rw-r--. 1 kaze kaze   13384856 Mar 15 10:55 coronavirus.unwrapped.fasta.Nakamichi
-rw-rw-r--. 1 kaze kaze 1317937667 Mar 15 10:55 coronavirus.unwrapped.fasta.NKMCH
[kaze@kaze Nakamichi_2021-Mar-12]$ sh BROTLIify.sh coronavirus.unwrapped.fasta
0b58ebce92369603ea03c6e11fb966476a1ba133  coronavirus.unwrapped.fasta
	Command being timed: "./brotli -q 11 --large_window=30 coronavirus.unwrapped.fasta"
	User time (seconds): 478.57
	System time (seconds): 3.36
	Percent of CPU this job got: 99%
	Elapsed (wall clock) time (h:mm:ss or m:ss): 8:02.92
	Average shared text size (kbytes): 0
	Average unshared data size (kbytes): 0
	Average stack size (kbytes): 0
	Average total size (kbytes): 0
	Maximum resident set size (kbytes): 9566888
	Average resident set size (kbytes): 0
	Major (requiring I/O) page faults: 13
	Minor (reclaiming a frame) page faults: 2393038
	Voluntary context switches: 6
	Involuntary context switches: 7004
	Swaps: 0
	File system inputs: 1480
	File system outputs: 4176
	Socket messages sent: 0
	Socket messages received: 0
	Signals delivered: 0
	Page size (bytes): 4096
	Exit status: 0

 Performance counter stats for './brotli -d -c coronavirus.unwrapped.fasta.br':

          1,282.16 msec task-clock:u              #    0.999 CPUs utilized          
                 0      context-switches:u        #    0.000 K/sec                  
                 0      cpu-migrations:u          #    0.000 K/sec                  
           520,554      page-faults:u             #    0.406 M/sec                  
     1,823,190,317      cycles:u                  #    1.422 GHz                      (49.91%)
       411,707,178      instructions:u            #    0.23  insn per cycle           (62.45%)
        50,839,247      branches:u                #   39.651 M/sec                    (62.53%)
         1,389,850      branch-misses:u           #    2.73% of all branches          (62.58%)
       148,267,447      L1-dcache-loads:u         #  115.639 M/sec                    (62.57%)
        85,799,264      L1-dcache-load-misses:u   #   57.87% of all L1-dcache accesses  (62.57%)
        27,551,205      LLC-loads:u               #   21.488 M/sec                    (49.95%)
        13,207,674      LLC-load-misses:u         #   47.94% of all LL-cache accesses  (49.90%)

       1.283181005 seconds time elapsed

       0.620655000 seconds user
       0.649701000 seconds sys


-rw-r--r--. 1 kaze kaze  2136516 Feb 16 11:05  coronavirus.unwrapped.fasta.br
-rw-rw-r--. 1 kaze kaze 62585595 Mar 13 17:49 'SUPRAPIG_The_Prague_Stringology_Club_(302-PostScript-files).tar.br'
[kaze@kaze Nakamichi_2021-Mar-12]$ sh BZIP2ify.sh coronavirus.unwrapped.fasta
0b58ebce92369603ea03c6e11fb966476a1ba133  coronavirus.unwrapped.fasta
rm: cannot remove 'coronavirus.unwrapped.fasta.bz2': No such file or directory
	Command being timed: "bzip2 -9 -k coronavirus.unwrapped.fasta"
	User time (seconds): 508.08
	System time (seconds): 0.29
	Percent of CPU this job got: 99%
	Elapsed (wall clock) time (h:mm:ss or m:ss): 8:30.78
	Average shared text size (kbytes): 0
	Average unshared data size (kbytes): 0
	Average stack size (kbytes): 0
	Average total size (kbytes): 0
	Maximum resident set size (kbytes): 8752
	Average resident set size (kbytes): 0
	Major (requiring I/O) page faults: 2
	Minor (reclaiming a frame) page faults: 1912
	Voluntary context switches: 59
	Involuntary context switches: 7323
	Swaps: 0
	File system inputs: 88
	File system outputs: 76336
	Socket messages sent: 0
	Socket messages received: 0
	Signals delivered: 0
	Page size (bytes): 4096
	Exit status: 0

 Performance counter stats for 'bzip2 -d -k':

         77,450.21 msec task-clock:u              #    0.999 CPUs utilized          
                 0      context-switches:u        #    0.000 K/sec                  
                 0      cpu-migrations:u          #    0.000 K/sec                  
               954      page-faults:u             #    0.012 K/sec                  
   191,288,426,636      cycles:u                  #    2.470 GHz                      (50.00%)
    79,397,595,247      instructions:u            #    0.42  insn per cycle           (62.50%)
    16,544,931,713      branches:u                #  213.620 M/sec                    (62.50%)
       547,295,881      branch-misses:u           #    3.31% of all branches          (62.50%)
    17,830,873,401      L1-dcache-loads:u         #  230.224 M/sec                    (62.50%)
     1,652,060,044      L1-dcache-load-misses:u   #    9.27% of all L1-dcache accesses  (62.50%)
     1,288,611,798      LLC-loads:u               #   16.638 M/sec                    (50.00%)
       530,074,447      LLC-load-misses:u         #   41.14% of all LL-cache accesses  (50.00%)

      77.498602547 seconds time elapsed

      76.596545000 seconds user
       0.151393000 seconds sys


[kaze@kaze Nakamichi_2021-Mar-12]$ ls -l co*
-rw-r--r--. 1 kaze kaze 1317937667 Feb 16 11:05 coronavirus.unwrapped.fasta
-rw-r--r--. 1 kaze kaze    2136516 Feb 16 11:05 coronavirus.unwrapped.fasta.br
-rw-r--r--. 1 kaze kaze   39083402 Feb 16 11:05 coronavirus.unwrapped.fasta.bz2
-rw-r--r--. 1 kaze kaze    1756950 Feb 16 11:05 coronavirus.unwrapped.fasta.L22W2GB.zst
-rw-rw-r--. 1 kaze kaze   13384856 Mar 15 10:55 coronavirus.unwrapped.fasta.Nakamichi
-rw-rw-r--. 1 kaze kaze 1317937667 Mar 15 10:55 coronavirus.unwrapped.fasta.NKMCH
[kaze@kaze Nakamichi_2021-Mar-12]$ 
