From e404d82bbf5931ce5c624cc73e7bdda7accb51a4 Mon Sep 17 00:00:00 2001 From: Guillaume Ayoub Date: Fri, 19 Jul 2024 00:18:33 +0200 Subject: [PATCH] Allow longer lines --- pydyf/__init__.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/pydyf/__init__.py b/pydyf/__init__.py index 9bba143..c6ded84 100755 --- a/pydyf/__init__.py +++ b/pydyf/__init__.py @@ -578,8 +578,7 @@ def write(self, output, version=b'1.7', identifier=False, compress=False): dict_index += 1 else: xref.append(( - bool(object_.number), object_.offset, - object_.generation)) + bool(object_.number), object_.offset, object_.generation)) xref.append((1, self.current_position, 0)) field2_size = ceil(log(self.current_position + 1, 256)) @@ -600,13 +599,11 @@ def write(self, output, version=b'1.7', identifier=False, compress=False): 'Info': self.info.reference, } if identifier: - data = b''.join( - obj.data for obj in self.objects if obj.free != 'f') + data = b''.join(obj.data for obj in self.objects if obj.free != 'f') data_hash = md5(data).hexdigest().encode() if identifier is True: identifier = data_hash - extra['ID'] = Array(( - String(identifier).data, String(data_hash).data)) + extra['ID'] = Array((String(identifier).data, String(data_hash).data)) dict_stream = Stream([xref_stream], extra, compress) self.xref_position = dict_stream.offset = self.current_position self.add_object(dict_stream)