#!/bin/sh
# gzip
# Wrapper for gzip to implement missing switches.

GZIP=/bin/gzip

case "${1}" in
--help)
   ${GZIP} --help
   # This needs to exit successfully.
   exit 0
   ;;
-l)
   # When interfacing with makepkg, it really doesn't matter
   # what bytecount is returned as long as it is non-zero.
   echo "$(zcat "${2}" | dd bs=64 count=1 2>/dev/null | wc -c)"
   exit 0
   ;;
esac

${GZIP} "$@"
exit $?
