aboutsummaryrefslogtreecommitdiff
path: root/quikr_util.py
blob: d055b74f007b700b38b9c782fee9c587a658c549 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# Helper Functions

# Check if file is gzip compressed
def isCompressed(filename):
  f = open(filename, "rb")

  # The first two bytes of a tar file are always '1f 8b'
  if f.read(2) == '\x1f\x8b':
    f.close()
    return True
  else:
    f.close()
    return False