ddi-fw 0.0.20__py3-none-any.whl → 0.0.22__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ddi_fw/utils/zip_helper.py +5 -5
- {ddi_fw-0.0.20.dist-info → ddi_fw-0.0.22.dist-info}/METADATA +1 -1
- {ddi_fw-0.0.20.dist-info → ddi_fw-0.0.22.dist-info}/RECORD +5 -5
- {ddi_fw-0.0.20.dist-info → ddi_fw-0.0.22.dist-info}/WHEEL +0 -0
- {ddi_fw-0.0.20.dist-info → ddi_fw-0.0.22.dist-info}/top_level.txt +0 -0
ddi_fw/utils/zip_helper.py
CHANGED
@@ -15,15 +15,16 @@ class ZipHelper:
|
|
15
15
|
with z.ZipFile(f'{output_path}/{name}.zip', 'w', compression=z.ZIP_LZMA, compresslevel=z.ZIP_LZMA) as zipObj:
|
16
16
|
zipObj.write(file_path, basename(file_path))
|
17
17
|
|
18
|
-
def zip_as_multipart(self, name,
|
19
|
-
|
18
|
+
def zip_as_multipart(self, name, folder, file_name, output_path, chunk_size):
|
19
|
+
file_path = folder+'/'+file_name
|
20
|
+
self.zip_single_file(name, file_path, output_path)
|
20
21
|
with open(file_path, 'rb') as f:
|
21
22
|
chunk_number = 1
|
22
23
|
while True:
|
23
24
|
chunk = f.read(chunk_size)
|
24
25
|
if not chunk:
|
25
26
|
break
|
26
|
-
with open(f"{
|
27
|
+
with open(f"{folder}/path/{file_name}.part{chunk_number:03}", 'wb') as chunk_file:
|
27
28
|
chunk_file.write(chunk)
|
28
29
|
chunk_number += 1
|
29
30
|
|
@@ -68,8 +69,7 @@ class ZipHelper:
|
|
68
69
|
for part in input_parts:
|
69
70
|
with open(part, 'rb') as infile:
|
70
71
|
outfile.write(infile.read())
|
71
|
-
self.extract(parts_path,output_path)
|
72
|
-
|
72
|
+
self.extract(parts_path, output_path)
|
73
73
|
|
74
74
|
|
75
75
|
# if __name__ == "__main__":
|
@@ -78,8 +78,8 @@ ddi_fw/test/type_guarding_test.py,sha256=KxjyBxohDu7lwpejalCj-REjtJ-k1S1wQbOB6TG
|
|
78
78
|
ddi_fw/utils/__init__.py,sha256=nhNU_sEp55xsZ5VtvhozjKg6r4GWP6SJI13v8F_jbCg,217
|
79
79
|
ddi_fw/utils/enums.py,sha256=19eJ3fX5eRK_xPvkYcukmug144jXPH4X9zQqtsFBj5A,671
|
80
80
|
ddi_fw/utils/utils.py,sha256=Na6Y8mY-CFbQjrgd9xC8agcrjVvTj_7KIXqFm1H_3qU,3549
|
81
|
-
ddi_fw/utils/zip_helper.py,sha256=
|
82
|
-
ddi_fw-0.0.
|
83
|
-
ddi_fw-0.0.
|
84
|
-
ddi_fw-0.0.
|
85
|
-
ddi_fw-0.0.
|
81
|
+
ddi_fw/utils/zip_helper.py,sha256=D0pYHifqfKSKEG2oTpGh_0eNwx5fYZIuR6CuQ4BorSg,3576
|
82
|
+
ddi_fw-0.0.22.dist-info/METADATA,sha256=wD31gaXsInwk3ERDHuhAHDqFlwGjtOLosWU7_3nu68M,1541
|
83
|
+
ddi_fw-0.0.22.dist-info/WHEEL,sha256=cVxcB9AmuTcXqmwrtPhNK88dr7IR_b6qagTj0UvIEbY,91
|
84
|
+
ddi_fw-0.0.22.dist-info/top_level.txt,sha256=PMwHICFZTZtcpzQNPV4UQnfNXYIeLR_Ste-Wfc1h810,7
|
85
|
+
ddi_fw-0.0.22.dist-info/RECORD,,
|
File without changes
|
File without changes
|