import struct


def decode(arg_fmt, arg_fileHandler):
	""" Using the struct module, read/decode a segment of binary data into a type indicated by the input format """
	sfmt = struct.calcsize(arg_fmt)
	return struct.unpack(arg_fmt, arg_fileHandler.readline(sfmt))