Given an implementation of the gzip specification, how to test if it is compressing accordingly to the specification, i.e. a valid gzip file?

My unitary test compresses an input and then decompresses it, comparing the input with decompressed output. I dont think that is sufficient to guarantee it is satisfying the specification.

Anyone know a valid strategy to test a gzip compression function?