Refactor LZ with stats and hook into gcif.cpp