Skip to content

Commit

Permalink
FEAT: adds --no-compress command-line option to disable built-in Redb…
Browse files Browse the repository at this point in the history
…in compression.

Avoids compressing the Redbin payload using our custom CRUSH algorithm. The resulting binary is about 50% bigger, but can be compressed then with an external tool more efficiently.
  • Loading branch information
dockimbel committed Jun 11, 2018
1 parent 9882e98 commit de47b6c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion compiler.r
Expand Up @@ -4516,7 +4516,7 @@ red: context [
]

comp-finish: does [
redbin/finish pick [[compress] []] to logic! redc/load-lib?
redbin/finish pick [[compress] []] to logic! all [redc/load-lib? job/redbin-compress?]
]

comp-source: func [code [block!] /local user main saved mods][
Expand Down
1 change: 1 addition & 0 deletions red.r
Expand Up @@ -725,6 +725,7 @@ redc: context [
| "--dev" (opts/dev-mode?: yes)
| "--no-runtime" (opts/runtime?: no) ;@@ overridable by config!
| "--cli" (gui?: no)
| "--no-compress" (opts/redbin-compress?: no)
| "--catch" ;-- just pass-thru
]
set filename skip (src: load-filename filename)
Expand Down
1 change: 1 addition & 0 deletions system/compiler.r
Expand Up @@ -65,6 +65,7 @@ system-dialect: make-profilable context [
red-strict-check?: yes ;-- no => defers undefined word errors reporting at run-time
red-tracing?: yes ;-- no => do not compile tracing code
red-help?: no ;-- yes => keep doc-strings from boot.red
redbin-compress?: yes ;-- yes => compress Redbin payload using custom CRUSH algorithm
legacy: none ;-- block of optional OS legacy features flags
gui-console?: no ;-- yes => redirect printing to gui console (temporary)
libRed?: no
Expand Down

0 comments on commit de47b6c

Please sign in to comment.