Skip to content

Commit f46808e

Browse files
authored
Update README.md
1 parent 46bff43 commit f46808e

1 file changed

Lines changed: 146 additions & 2 deletions

File tree

README.md

Lines changed: 146 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,144 @@ That's still quite hard to crack: 85 or 91 minus 6 _(MSCAB. :D)_ \*factorial com
3333
Reusing the key is a must when adding multiple bundled files in the same script - all have to use the same key!
3434
Script will verify if input key matches the length and base dictionary and if not provide the information
3535

36+
### Finding the right options for your target files
37+
Script has plenty of GUI choices to help you determine the best course of action for the specific file(s).
38+
By default script will be doing 2-pas mscab compression, first grabing files uncompressed, then LZX compress them.
39+
This works best with really deep directory structure and lots of small files.
40+
For monolithic huge files that are not very compressible, you should select option __5: No LZX compression (full size)__
41+
A ridiculous 259.45MB source file "achieving" 98.94% compression is not worth the extra 4min38s for saving 1.06%
42+
<details>
43+
<summary>Practical example (click here to show)</summary>
44+
45+
Let's say we want something pointless as encoding a huge boot.wim from a mounted iso:
46+
Already know it's not a compressible file so we can save time directly selecting option __5: No LZX compression__
47+
48+
but just to confirm it, run with just the option __6: No text encoder (cab archive only)__
49+
```
50+
F:\sources\boot.wim
51+
cabonly
52+
53+
Cabinet Maker - Lossless Data Compression Tool
54+
55+
272,062,257 bytes in 1 files
56+
Total files: 1
57+
Bytes before: 272,062,257
58+
Bytes after: 269,188,732
59+
After/Before: 98.94% compression
60+
Time: 278.01 seconds ( 0 hr 4 min 38.01 sec)
61+
Throughput: 955.66 Kb/second
62+
```
63+
_not very compressible 256.78MB, and took almost 5 mins_
64+
65+
let's see how it is going to be also adding option __5: No LZX compression__
66+
```
67+
F:\sources\boot.wim
68+
nocompress,cabonly
69+
70+
Cabinet Maker - Lossless Data Compression Tool
71+
72+
272,062,257 bytes in 1 files
73+
Total files: 1
74+
Bytes before: 272,062,257
75+
Bytes after: 272,062,257
76+
After/Before: 100.00% compression
77+
Time: 36.97 seconds ( 0 hr 0 min 36.97 sec)
78+
Throughput: 7187.11 Kb/second
79+
```
80+
_259.52MB, and took just 37 seconds, so it makes much more sense to encode with option 5_
81+
82+
let's do the actual text encoding, first with defaults:
83+
```
84+
F:\sources\boot.wim
85+
nolonglines
86+
87+
Cabinet Maker - Lossless Data Compression Tool
88+
89+
272,062,257 bytes in 1 files
90+
Total files: 1
91+
Bytes before: 272,062,257
92+
Bytes after: 272,062,257
93+
After/Before: 100.00% compression
94+
Time: 36.60 seconds ( 0 hr 0 min 36.60 sec)
95+
Throughput: 7258.98 Kb/second
96+
97+
Cabinet Maker - Lossless Data Compression Tool
98+
99+
272,128,750 bytes in 1 files
100+
Total files: 1
101+
Bytes before: 272,128,750
102+
Bytes after: 269,257,638
103+
After/Before: 98.94% compression
104+
Time: 269.88 seconds ( 0 hr 4 min 29.88 sec)
105+
Throughput: 984.71 Kb/second
106+
107+
BAT85 encoding C:\Users\z\Desktop\boot.wim~.bat ...
108+
8.8713828 seconds
109+
```
110+
_331.33MB and 5 mins, as expected_
111+
112+
then encode with option __5: No LZX compression__
113+
```
114+
F:\sources\boot.wim
115+
nolonglines,nocompress
116+
117+
Cabinet Maker - Lossless Data Compression Tool
118+
119+
272,062,257 bytes in 1 files
120+
Total files: 1
121+
Bytes before: 272,062,257
122+
Bytes after: 272,062,257
123+
After/Before: 100.00% compression
124+
Time: 40.91 seconds ( 0 hr 0 min 40.91 sec)
125+
Throughput: 6494.56 Kb/second
126+
127+
BAT85 encoding C:\Users\z\Desktop\boot.wim~.bat ...
128+
7.8508956 seconds
129+
```
130+
_334.78MB. As expected. For such large files is not worth saving 1-2MB for the cost of extra 4min30s_
131+
132+
Also for large files is best to uncheck the default choice __4: No long lines (more overhead)__
133+
```
134+
F:\sources\boot.wim
135+
nocompress
136+
137+
Cabinet Maker - Lossless Data Compression Tool
138+
139+
272,062,257 bytes in 1 files
140+
Total files: 1
141+
Bytes before: 272,062,257
142+
Bytes after: 272,062,257
143+
After/Before: 100.00% compression
144+
Time: 40.75 seconds ( 0 hr 0 min 40.75 sec)
145+
Throughput: 6519.90 Kb/second
146+
147+
BAT85 encoding C:\Users\z\Desktop\boot.wim~.bat ...
148+
7.8476116 seconds
149+
```
150+
_325.68MB. When I say more overhead with No long lines - I mean it._
151+
_Just unselecting choice 4 you save more than two-pass LZX compress, without the extra 4min30s time!_
152+
153+
How about using choice __3: BAT91 encoder instead of BAT85__
154+
```
155+
F:\sources\boot.wim
156+
bat91,nocompress
157+
158+
Cabinet Maker - Lossless Data Compression Tool
159+
160+
272,062,257 bytes in 1 files
161+
Total files: 1
162+
Bytes before: 272,062,257
163+
Bytes after: 272,062,257
164+
After/Before: 100.00% compression
165+
Time: 36.39 seconds ( 0 hr 0 min 36.39 sec)
166+
Throughput: 7300.26 Kb/second
167+
168+
BAT91 encoding C:\Users\z\Desktop\boot.wim~.bat ...
169+
7.6984016 seconds
170+
```
171+
_320.33MB. BAM! The most efficient text encoder using just built-in tools in Windows 7+_
172+
</details>
173+
36174
## Typical usage
37175
Used mostly for sharing configs / scripts / dumps / captures as plain-text on message boards that lack proper file attachments, or to safekeep, run multiple tests and sharing binaries in malware analysis tasks
38176

@@ -50,7 +188,9 @@ Dictionary (can be randomized):
50188
```
51189
.,;{-}[+](/)_|^=?O123456A789BCDEFGHYIeJKLMoN0PQRSTyUWXVZabcdfghijklmnpqrvstuwxz!@#$&~
52190
```
53-
Encoded example of this release with randomized key used as a password:
191+
<details>
192+
<summary>Encoded example of this release with randomized key used as a password:</summary>
193+
54194
```bat
55195
@echo off& color 07& chcp 65001 >nul
56196
set "0=%~f0"&powershell -nop -c cd -li(Split-Path $env:0);$f=[IO.File]::ReadAllText($env:0)-split':bat2file\:.*';iex($f[1]); X 1
@@ -75,6 +215,7 @@ n=0;}} if (p>0) {for (int i=0;i<5-p;i++) {n += 84 * p85[p+i];} q=4; while (q > p
75215
::-3D_1|QLuvsmog}y-FH9_IRv1QfGr4_H,fQ#Q&,?1CLv7/T6d3s2M@S?P{tl,V@fP@P1MFm36LY(lq6N?dW!8##2iUg|LG;gTDIYdG|q/{(P!gj$NGOnqSXVt;4ZQ?AB}$S8WLa@=B,gQ}x-6Wpb#Y&?4QwX.g(,;j7feA)~1V6Q@aG7IP@YGG75!hE|50kgntVB7K6.h8J[~@FU-u,fr)DyZ0ci4)B7X=.d}0=L92}OxNxtE&JcCB/A-F+(}I,#+xE]#c[qRpLCn9OinEHg[?,77-P^fU!fP|iJ?u8SDyhj=mW7UQFg^dlWO[7=e]qCFU^XE](w9gq]26zHbnt&2!p7gsZvQ[.jxc[K87I]PVg{K,-rIhxx#$6E/8_/&4#Nm!~6ye]zl}1VH+--Eu9MU;;2a{+l??9J8Vu+]u]Dqv5fdx$C9EiL2y(cX/ihr8FyRso(E[hm7)&l~?H0-1eBGj6^?R-v{)+it8W@$bC;XTIX4bVv;Plqs^OYJ#2({vUJJE57SyEFDriLbal8qIk(+2ahW[[7Z$xYWOGt6)dxICYZqrYQ#q!@/r^V_UiFKBes-h&Tn~,of{HzDu$.rL}.dW6+&ja&y.C-wAC|G5aO!D0e87{iBVOVun!$X|WfV.]3{p,.CCahM2+pEv!NH4g?aRK|pQgrO[smmp[JhTBzJ}=eSh5dv[hEGw/9CNH^p7ji56[Oo-,+-bwTBu=Y9d(dmC(XY7PnBBse^x/s|/]vUK+aYMi]wj~^F3Woe9(Fs}o_y=8Kj,;{rp=0i8tQfzj9R{pu&RA^A2+G
76216
:bat2file:]
77217
```
218+
</details>
78219

79220
## BAT91 encoder/decoder details
80221
Tweaked version of [base91](http://base91.sourceforge.net) that works ok with batch syntax highlighter used by pastebin and others.
@@ -86,7 +227,9 @@ Dictionary (can be randomized):
86227
```
87228
.,;{-}[+](/)_|^=?O123456789ABCDeFGHyIdJKLMoN0PQRSTYUWXVZabcfghijklmnpqrstuvwxz!@#$&~E<*`%\>
88229
```
89-
Encoded example of this release with randomized key bundled for auto-extract:
230+
<details>
231+
<summary>Encoded example of this release with randomized key bundled for auto-extract:</summary>
232+
90233
```bat
91234
@echo off& color 07& chcp 65001 >nul
92235
set "0=%~f0"&powershell -nop -c cd -li(Split-Path $env:0);$f=[IO.File]::ReadAllText($env:0)-split':bat2file\:.*';iex($f[1]); X 1
@@ -111,6 +254,7 @@ do {o.WriteByte((byte)q); q >>= 8; n -= 8;} while (n>7);} } if (v != 91) o.Write
111254
::LGG,}X.Y5,1N}?p_E|MO3iHtEwXSR$22,ZTK^FOQd7Y.k?gZ=wyj6;uRL0iB#qx3kSJ9C+Q=HwY\sFE1@!?)@rlh0b4$[rVHs0-J|+Vsfl$%9Z|h;t@86z4xiv?@p&;QT6?#IB1v;3[8.(E=^WzzR7Dt+Pm!E1%0G]1zOXcz1a5hH3qf&4rfVD9s\y!*D{pa/ufyW$qlVqnS8xW\w|73HAB\@Qe1`bhwz3-r)/}E;6az^JA+tQj})YEJaIIOU_MF&S,0$BKF05?a]/U$2FgK8}bQH2r?!ny3l*KUYsE*RUJ|W_X^5QY+FA9@S8(*6`+Tze~Rg8OWbd??jIdRDR(&Lq#RAH6Olr(XnE-$AMTZ_j45^]C3nFQxaw/cOpUE+({eMfP-[Nt9DCtqfvKE?$l0}}4?,vJ\?lz.#33LI<D$u|C.W9ji4DYCKDzbx^fxZtu4|`Qos`Snew/O.)w53ipM+y{Fs=TiH5\JL*!VAVa_v/6+;8+CjrE6oA<14@MP#<e05pAQbK77hTp#`,MjY5[#-;bGk?&M(<vanXN\@hlhI=W\!-SUh_lIeD/G?U3k#h97m)p#PBOSMZe>R`XHq+;VY*gbdcpL(sbQjWiA[tp@<eTVne@*v3LC$wNK`p\x>PNsdu4KWLw~8v4|Hj;Dv+Q(>xiJ]._Db)q6^?8gW{).HKXVb$>`(
112255
:bat2file:]
113256
```
257+
</details>
114258

115259
## Intuitive multiple encoded files support with low overhead
116260
One-liner trigger for multiple bundled files decode in one go:

0 commit comments

Comments
 (0)