fixed 0 byte input file and -p 1 compress
added more tests for edge cases and gzip compatibility