mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-10-25 10:40:57 +00:00
Make redbean tinier
Under MODE=tiny or MODE=tinylinux we now go back to using my homebrew
version of DEFLATE decompression which is 10x smaller but 10x slower
than Chromium Zlib. In tiny mode we also disable compressed responses
howewver redbean will still serve precompressed responses. This change
also removes a few other dependencies like strftime() and getaddrinfo()
which means you can't say `-l localhost` in tiny mode, you have to say
something like `-l 127.0.0.1`.
m=tinylinux
make -j8 MODE=$m o/$m/tool/net/redbean-original.com
ls -hal o/$m/tool/net/redbean-original.com
This change reduces the above size from 191.4 to 150.9 kb.
This commit is contained in:
parent
300876ee50
commit
a7bd4ed9ea
8 changed files with 123 additions and 46 deletions
|
|
@ -35,7 +35,7 @@ char *FormatHttpDateTime(char p[hasatleast 30], struct tm *tm) {
|
|||
p = mempcpy(p, kWeekdayNameShort[tm->tm_wday], 3);
|
||||
*p++ = ',';
|
||||
*p++ = ' ';
|
||||
i = MIN(MAX(tm->tm_mday, 0), 31);
|
||||
i = MIN(MAX(tm->tm_mday, 1), 31);
|
||||
*p++ = '0' + i / 10;
|
||||
*p++ = '0' + i % 10;
|
||||
*p++ = ' ';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue