refactor: consolidate miniz implementation