jsDays
jsDays Italy
jsDays Italy 2017
jsDays Italy 2017eleventh of May
typing gifwhoa coding
Abraham Lempel and Jacob Ziv
Accept-Encoding:gzip, deflate, sdch, br
deflate
deflatewhat are these blocks even
waiting
in
this seasons hottest codebuster
........ codebuster, get it?
KNOCK-KNOCK
KNOCK-KNOCK-WHO-THERE
KNOCK-KNOCK-WHO-THERE-FLE-COMPRSSN
KNOCK-KNOCK-WHO-THERE-FLE-COMPRSSN-TALK.TAR.TRZ.BZ2.GZ
KNOCK-KNOCK-WHO-THERE-FILE-COMPRSSN-TALK_FINAL.TAR.TRZ.BZ2.GZ
KNOCK-KNOCK-WHO-THERE-FILE-COMPRESSION-TALK_FINAL2.TAR.TRZ.BZ2.GZ
I am _lrlna
I write code over at scripto.cc
Compression
o(*^β–½^*)o
"Roles of the JavaScript are extending far beyond XML/HTML DOM manipulation"
Yasutaka Sakamoto et al.
(lol cute)
"Roles of the JavaScript are extending far beyond XML/HTML DOM manipulation"
Yasutaka Sakamoto et al.
we are creating a ton of jahhvascript traffic, y'all
"JavaScript data traffic is saving over 50% by HTTP compression."
Yasutaka Sakamoto et al.
zlib.gzip(min.code, function (err, compressed) { if (err) { log.error(err, 'Unable to gzip output') return fs.writeFile(cachedFile, min.code, logger) } fs.writeFile(cachedFile, compressed, logger) })
HTTP Compression
compress
compress
compression size
typical frame
typical frame
typical frame
accept encoding
content encoding
Accept-Encoding:gzip, deflate, sdch, br
Accept-Encoding:gzip, deflate, sdch, br
what makes deflate
Huffffffff
ff-ffffffman
coding
huffman coding
generate
frequency
table
huffman coding
frequency table
get the pppppp
ppppp
pprobability
frequency table
🌳🌳🌳🌳 🌳 🌳 🌳 🌳 🌳 🌳 🌳 🌳 🌳 🌳 🌳 🌳
🌳🌳trees
🌳🌳🌳🌳 🌳 🌳 🌳 🌳 🌳 🌳 🌳 🌳 🌳 🌳 🌳 🌳
frequency table
frequency table
frequency table
frequency table
frequency table
frequency table
frequency table
frequency table
frequency table
Abraham Lempel and Jacob Ziv
LZ77
huffman coding
huffman coding
huffman coding
huffman coding
< length, distance >
what makes deflate
DEFLATE: used with PNGs, ZIP, gzip
huffman coding
typical frame
typical frame
typical frame
typical frame
typical frame
Accept-Encoding:gzip, deflate, sdch, br
what makes gzip
what makes zlib
more control over processing + memory use
create better tradeoffs
comes with 9 presets for compression
oh, hey use require('zlib')
typingcodin o'clock
Accept-Encoding:gzip, deflate, sdch, br
brotli
brotli:more intune to HTTP compression
typical frame
a single deflate block
a single brotli block
comes with a dictionary of commonly used HTML terms
waitingbutit's base, it's a bit slower
require('iltorb')
typinggcodin o'clock
require('iltorb')
waitingwayyyy slower
sss
snappy
snappy
snappyway faster
require('node-snappy')
Accept-Encoding:gzip, deflate, sdch, br
Thanks for having me o(*^β–½^*)o
sourcesdot js
libbbs
node's zlib
shrin-ray
iltorb, node's brotli with native bindings
snappyyy
articles
cloudflare + brotli
dropbox + brotli
accept encoding