News for hackers. Stuff that matters.
Re:Brendan Eich: WebAssembly is a game-changer by vmorgulis on Friday March 11, 2016 @03:43PM (#11269366)
Very cool! I appreciate the details :-)

I ran a quick with the tool (xzminidec) that comes with XZ Embedded.

    gcc -O3 -s -D XZ_USE_CRC64 -o xzminidec xzminidec.c xz_crc32.c xz_crc64.c xz_dec_stream.c xz_dec_lzma2.c 
    du -b xzminidec
     19472	xzminidec

    ldd xzminidec
     linux-vdso.so.1 (0x00007ffe9905c000)
     libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f105c83b000)
     /lib64/ld-linux-x86-64.so.2 (0x000055d818666000)

    du -b enwik8.zip 
     36445475	enwik8.zip

    du -b enwik8.xz 
     26375764	enwik8.xz

    time unzip enwik8.zip
     real	0m1.023s
     user	0m0.948s
     sys	0m0.068s

    time cat enwik8.xz | ./xzminidec > out-xz.txt
     real	0m2.598s
     user	0m2.504s
     sys	0m0.136s

    cmp enwik8 out-xz.txt 
     (empty)
unzip is faster but the xz decoder is very tiny and the compressed input file is smaller.

There are no comments on this comment yet.