diff --git a/utils.py b/utils.py index 2ce17a7..7ff118f 100644 --- a/utils.py +++ b/utils.py @@ -12,6 +12,11 @@ class Utils: self.home_path = str(Path.home()) def bstring_to_oz(self, data): # convert binary data to a string of ones and zeros (oz) - oz_string = " ".join([format(byte, "08b") for byte in data]) + oz_bytes = [] + + for byte in data: + oz_bytes.append(format(byte, "08b")) + + oz_string = " ".join(oz_bytes) return oz_string