DeepFaceLab/core/structex.py
2020-01-21 18:43:39 +04:00

6 lines
175 B
Python

import struct
def struct_unpack(data, counter, fmt):
fmt_size = struct.calcsize(fmt)
return (counter+fmt_size,) + struct.unpack (fmt, data[counter:counter+fmt_size])