compiler/iface: compress .hi files
authorAustin Seipp <austin@well-typed.com>
Fri, 20 May 2016 03:25:08 +0000 (03:25 +0000)
committerAustin Seipp <austin@well-typed.com>
Sat, 21 May 2016 16:55:16 +0000 (16:55 +0000)
commitd9cb7a8a94daa4d20aa042cd053e20b491315633
treeaedce747b5202ab49da01a17c8dbebc13e313116
parenta1f3bb8ca454f05fa35cb6b5c64e92f640380802
compiler/iface: compress .hi files

Compress all interface files generated by the compiler with LZ4. While
being only a tiny amount of code, LZ4 is both fast at compression and
decompression, and has good compression ratios.

Non-scientific size test: size of stage2 compiler .hi files:

`find ./compiler/stage2 -type f -iname '*.hi' -exec du -ch {} + | grep total$`

Without this patch: 22MB of .hi files for stage2.
With this patch: 9.2MB of .hi files for stage2.

Signed-off-by: Austin Seipp <austin@well-typed.com>
Reviewed By: bgamari

Differential Revision: https://phabricator.haskell.org/D1159
compiler/cbits/lz4.c [new file with mode: 0644]
compiler/cbits/lz4.h [new file with mode: 0644]
compiler/ghc.cabal.in
compiler/ghc.mk
compiler/utils/Binary.hs
compiler/utils/LZ4.hs [new file with mode: 0644]
docs/users_guide/8.2.1-notes.rst