aboutsummaryrefslogtreecommitdiff
path: root/quikr_util.py
blob: b2fb9688b7a74f449cd410a7c673284664d4c3d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
# 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