rtzip 0.3.0__tar.gz → 0.4.0__tar.gz

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.
rtzip-0.4.0/PKG-INFO ADDED
@@ -0,0 +1,6 @@
1
+ Metadata-Version: 2.3
2
+ Name: rtzip
3
+ Version: 0.4.0
4
+ Requires-Dist: obstruct==0.5.2
5
+ Requires-Dist: pyaes>=1.6.1
6
+ Requires-Python: >=3.12
@@ -0,0 +1,19 @@
1
+ [build-system]
2
+ build-backend = "uv_build"
3
+ requires = ["uv_build < 0.13"]
4
+
5
+ [project]
6
+ name = "rtzip"
7
+ version = "0.4.0"
8
+ requires-python = ">=3.12"
9
+ dependencies = [
10
+ "obstruct==0.5.2",
11
+ "pyaes>=1.6.1",
12
+ ]
13
+
14
+ [dependency-groups]
15
+ dev = [
16
+ "cryptography>=50.0.1",
17
+ "niquests>=3.21.0",
18
+ "pycryptodome>=3.23.0",
19
+ ]
@@ -0,0 +1,21 @@
1
+ [build-system]
2
+ build-backend = 'uv_build'
3
+ requires = [
4
+ 'uv_build < 0.13'
5
+ ]
6
+
7
+ [project]
8
+ name = "rtzip"
9
+ version = "0.4.0"
10
+ requires-python = ">=3.12"
11
+ dependencies = [
12
+ "obstruct==0.5.2",
13
+ "pyaes>=1.6.1",
14
+ ]
15
+
16
+ [dependency-groups]
17
+ dev = [
18
+ "cryptography>=50.0.1",
19
+ "niquests>=3.21.0",
20
+ "pycryptodome>=3.23.0",
21
+ ]
@@ -2,3 +2,5 @@ from .algorithm_register import algorithm_handler, get_algorithm_handler
2
2
  from .errors import *
3
3
  from .models import EOCD, Zip64EOCD, CDEntry
4
4
  from .remotezip import RemoteZip, DataSource
5
+
6
+ from . import codec_wrappers
@@ -1,7 +1,9 @@
1
1
  from collections.abc import Buffer
2
- from typing import Callable, AsyncGenerator
2
+ from typing import Callable, AsyncGenerator, Any
3
3
 
4
- AlgorithmHandler = Callable[[AsyncGenerator[Buffer, None]], AsyncGenerator[bytes | bytearray | memoryview, None]]
4
+ from .models import CDEntry, LocalFileHeader
5
+
6
+ AlgorithmHandler = Callable[[AsyncGenerator[Buffer, None], CDEntry, LocalFileHeader, dict[str, Any]], AsyncGenerator[bytes | bytearray | memoryview, None]]
5
7
 
6
8
  algorithm_mapping: dict[int, AlgorithmHandler] = {}
7
9
 
@@ -12,7 +14,6 @@ def algorithm_handler(algorithm: int, override=False):
12
14
 
13
15
  :param algorithm: 压缩算法 ID
14
16
  :param override: 如果你希望覆盖一个已注册的包装器,请设置为 True,否则将会阻止可能的覆盖行为
15
- :param decorator.func: 被包装的函数,接受一个异步生成器,返回一个异步生成器
16
17
  :return:
17
18
  """
18
19
  if not override and algorithm in algorithm_mapping:
@@ -4,7 +4,7 @@ from .algorithm_register import algorithm_handler
4
4
 
5
5
 
6
6
  @algorithm_handler(0x0008)
7
- async def deflate_wrapper(gen):
7
+ async def deflate_wrapper(gen, entry, header, ext):
8
8
  import zlib
9
9
  decompresser = zlib.decompressobj(-15) # 禁用 zlib 头部
10
10
  async for chunk in gen:
@@ -15,13 +15,13 @@ async def deflate_wrapper(gen):
15
15
 
16
16
 
17
17
  @algorithm_handler(0x0000)
18
- async def raw_wrapper(gen):
18
+ async def raw_wrapper(gen, entry, header, ext):
19
19
  async for chunk in gen:
20
20
  yield chunk
21
21
 
22
22
 
23
23
  @algorithm_handler(0x000E)
24
- async def lzma_wrapper(gen):
24
+ async def lzma_wrapper(gen, entry, header, ext):
25
25
  import lzma
26
26
  decompressor = lzma.LZMADecompressor()
27
27
 
@@ -41,7 +41,7 @@ async def lzma_wrapper(gen):
41
41
  )
42
42
 
43
43
  @algorithm_handler(0x000C)
44
- async def bz2_wrapper(gen):
44
+ async def bz2_wrapper(gen, entry, header, ext):
45
45
  import bz2
46
46
  decompressor = bz2.BZ2Decompressor()
47
47
 
@@ -66,7 +66,7 @@ async def bz2_wrapper(gen):
66
66
 
67
67
  if sys.version_info >= (3, 14):
68
68
  @algorithm_handler(0x000D)
69
- async def zstd_wrapper(gen): # Not Tested
69
+ async def zstd_wrapper(gen, entry, header, ext): # Not Tested
70
70
  import warnings
71
71
  warnings.warn("ZStandard support is experimental and has not been tested")
72
72
 
@@ -8,3 +8,7 @@ class UnsupportedCryptoError(Exception):
8
8
 
9
9
  class UnsupportedDataDescriptorError(Exception):
10
10
  ...
11
+
12
+
13
+ class WrongPasswordError(Exception):
14
+ ...
@@ -5,11 +5,15 @@ from typing import Annotated, Self
5
5
 
6
6
  import obstruct as obs
7
7
 
8
- from rtzip.utils import exactly_get_slice
9
-
10
8
  EXTRA_FIELD_HEADER = struct.Struct("<HH")
11
9
 
12
10
 
11
+ def exactly_get_slice(__obj, __offset, __length):
12
+ result = __obj[__offset:__offset + __length]
13
+ assert len(result) == __length
14
+ return result
15
+
16
+
13
17
  def parse_extra_fields(buffer):
14
18
  res = {}
15
19
 
@@ -192,6 +196,10 @@ class CDEntry(obs.Struct):
192
196
  """
193
197
  return bool(self.flags & 0b100)
194
198
 
199
+ @property
200
+ def is_symlink(self):
201
+ return (self.outer_file_attrs >> 16) & 0xF000 == 0xA000
202
+
195
203
  @property
196
204
  def extra_fields(self) -> dict[int, bytes]:
197
205
  """
@@ -0,0 +1,17 @@
1
+ def remove_consecutive_duplicates(data: bytes, byte: int = b'/'[0]) -> bytes:
2
+ """双指针法,最快实现"""
3
+ if not data:
4
+ return data
5
+
6
+ result = bytearray()
7
+ prev = None
8
+ for b in data:
9
+ if b == byte and prev == byte:
10
+ continue # 跳过重复的
11
+ result.append(b)
12
+ prev = b
13
+ return bytes(result)
14
+
15
+
16
+ def normpath(path: bytes) -> bytes:
17
+ return remove_consecutive_duplicates(path).removeprefix(b'/')
@@ -1,11 +1,14 @@
1
1
  import struct
2
2
  from collections.abc import Buffer
3
+ from fnmatch import fnmatch
3
4
  from typing import AsyncGenerator
4
5
 
5
6
  from .algorithm_register import is_algorithm_available, get_algorithm_handler
6
7
  from .const import *
7
- from .errors import UnsupportedAlgorithmError, UnsupportedCryptoError, UnsupportedDataDescriptorError
8
+ from .errors import UnsupportedAlgorithmError
8
9
  from .models import EOCD, Zip64EOCD, CDEntry, LocalFileHeader
10
+ from .zip_crypto import zipcrypto_wrapper
11
+ from .path_methods import normpath
9
12
 
10
13
 
11
14
  class DataSource:
@@ -36,12 +39,6 @@ class DataSource:
36
39
  """
37
40
 
38
41
 
39
- def exactly_get_slice(__obj, __offset, __length):
40
- result = __obj[__offset:__offset + __length]
41
- assert len(result) == __length
42
- return result
43
-
44
-
45
42
  async def single_chunk_wrapper(__data: Buffer, /):
46
43
  yield __data
47
44
 
@@ -53,7 +50,7 @@ class RemoteZip:
53
50
  (RemoteZip 不会缓存已读取的文件,你需要自己保证数据复用)
54
51
 
55
52
  :ivar source: 数据源回调对象
56
- :ivar cd_info: 中央仓库元数据(EOCD),可能为 EOCD、Zip64EOCD 或 None 值
53
+ :ivar zip_info: 中央仓库元数据(EOCD),可能为 EOCD、Zip64EOCD 或 None 值
57
54
  :ivar files: 中央目录文件列表
58
55
  :ivar file_mapping: 构建的文件映射表,可能为 None
59
56
  :ivar is_zip64: 此 zip 文件是否启动了 zip64 扩展,默认为 False
@@ -68,24 +65,53 @@ class RemoteZip:
68
65
  async def _get_total_size(self):
69
66
  return await self.source.get_total_size()
70
67
 
68
+ __slots__ = [
69
+ 'source', 'zip_info', 'files', 'file_mapping', 'cached_headers', 'is_zip64',
70
+ '_namelist'
71
+ ]
72
+
71
73
  def __init__(self, source: DataSource):
72
74
  self.source = source
73
75
 
74
- self.cd_info: EOCD | Zip64EOCD | None = None
75
- self.files: list[CDEntry] = []
76
+ self.zip_info: EOCD | Zip64EOCD | None = None
77
+ self.files: list[CDEntry] | None = None
76
78
  self.file_mapping: dict[bytes, CDEntry] | None = None
77
79
 
78
- self.is_zip64 = False
80
+ self.cached_headers: dict[bytes, LocalFileHeader] = {}
79
81
 
80
- async def fetch_zip_info(self, initial_chunk=4096, max_cnt=-1, loss_factor: int | float = 2):
82
+ self.is_zip64 = False
83
+ self._namelist = None
84
+
85
+ def namelist(self):
86
+ if self._namelist is None:
87
+ if self.files is None:
88
+ raise ValueError("No files. Please call `fetch_file_list()` first")
89
+ self._namelist = [
90
+ f.filename for f in self.files
91
+ ]
92
+
93
+ return self._namelist
94
+
95
+ async def fetch_zip_info(
96
+ self,
97
+ initial_chunk=4096,
98
+ max_cnt=-1,
99
+ loss_factor: int | float = 2,
100
+ reuse=True
101
+ ) -> EOCD | Zip64EOCD:
81
102
  """
82
103
  获取 zip 文件的元信息(EOCD)
83
104
 
105
+ :param reuse: 如果启用,函数会缓存上一次的获取结果(并保存在 ``.zip_info`` 中),否则将会重新扫描 EOCD 并覆盖旧缓存
84
106
  :param initial_chunk: 初始扫描的大小
85
107
  :param max_cnt: 最大重试次数
86
108
  :param loss_factor: 重试后更新扫描大小的系数
87
- :return: 一个 EOCD 或者 Zip64EOCD 对象(如果这个 zip 文件启用了 zip64 扩展)
109
+ :return: 一个 ``EOCD`` 或者 ``Zip64EOCD`` 对象(如果这个 zip 文件启用了 zip64 扩展)
110
+
88
111
  """
112
+ if reuse and self.zip_info is not None:
113
+ return self.zip_info
114
+
89
115
  chunk_size = initial_chunk
90
116
 
91
117
  last_start = await self._get_total_size()
@@ -101,9 +127,11 @@ class RemoteZip:
101
127
 
102
128
  signature_pos = buffer.rfind(EOCD_SIGNATURE)
103
129
  if signature_pos != -1:
104
- self.cd_info = eocd = EOCD.from_buffer(buffer[signature_pos:])
130
+ self.zip_info = eocd = EOCD.from_buffer(buffer[signature_pos:])
105
131
  # return cnt
106
132
  if eocd.total_entries == 0xFFFFFFFF or eocd.cd_offset == 0xFFFFFFFF or eocd.cd_size == 0xFFFFFFFF:
133
+ # 处理 zip64 扩展
134
+ # 我们需要解析 Locator 并定位到 Zip64 EOCD 获取信息
107
135
  self.is_zip64 = True
108
136
 
109
137
  # 继续获取 zip64 的 eocd
@@ -157,10 +185,10 @@ class RemoteZip:
157
185
 
158
186
  # print(zip64_eocd)
159
187
 
160
- self.cd_info = zip64_eocd
161
- return self.cd_info
188
+ self.zip_info = zip64_eocd
189
+ return self.zip_info
162
190
  else:
163
- return self.cd_info
191
+ return self.zip_info
164
192
 
165
193
  if max_cnt != -1 and cnt >= max_cnt:
166
194
  raise RuntimeError
@@ -170,15 +198,24 @@ class RemoteZip:
170
198
  else:
171
199
  raise RuntimeError
172
200
 
173
- async def fetch_file_list(self, ignore_extra: bool = False) -> list[CDEntry]:
201
+ async def fetch_file_list(self, ignore_extra: bool = False, reuse=True) -> list[CDEntry]:
174
202
  """
175
203
  从远程 zip 的中央目录获取文件列表
176
204
 
205
+ 自动在 `zip_info` 缺失的情况下拉取
206
+
177
207
  :param ignore_extra: 是否忽略无法解析的片段并返回已有的内容
208
+ :param reuse: 如果启用,将自动缓存已拉取的数据(位于 ``.files`` 属性)并复用它,否则将重新拉取文件列表并覆盖缓存
178
209
  :return: 一个列表,包含所有获取到的文件
179
210
  """
180
- assert self.cd_info
181
- eocd = self.cd_info
211
+
212
+ if reuse and self.files is not None:
213
+ return self.files
214
+
215
+ if self.zip_info is None:
216
+ self.zip_info = await self.fetch_zip_info()
217
+
218
+ eocd = self.zip_info
182
219
  buffer = bytearray()
183
220
  files = []
184
221
 
@@ -206,24 +243,29 @@ class RemoteZip:
206
243
  break
207
244
 
208
245
  if buffer and not ignore_extra:
209
- # print("Read Entries: ", len(files))
210
- # print("Buffer:", buffer)
211
246
  raise ValueError()
212
247
 
213
248
  self.files = files
214
249
 
250
+ self._namelist = None
251
+
215
252
  return files
216
253
 
217
- async def fetch_file_header(self, filename=None, entry: CDEntry | None = None):
254
+ async def fetch_file_header(self, filename=None, entry: CDEntry | None = None, reuse=True):
218
255
  """
219
256
  获取 filename 对应的本地文件头
220
257
 
258
+ :param reuse: 如果启用,将自动缓存已获取的本地文件头,否则将重新拉取并覆盖缓存
221
259
  :param filename: 文件名称,可选
222
260
  :param entry: CDEntry 对象,可选
223
261
  :return: 一个 LocalFileHeader 对象,以及在解析时获取到的多余数据(在文件本身很小的时候,这一段数据可以直接解析出文件内容)
224
262
  """
225
- filename = str(filename)
226
- entry = entry or self.find_file_entry(filename)
263
+
264
+ entry = entry or self.find_file_entry(normpath(bytes(filename)))
265
+
266
+ if reuse and entry.filename in self.cached_headers:
267
+ return self.cached_headers[entry.filename]
268
+
227
269
  buffer = await self._read_range(entry.local_header_offset, entry.__cstruct__.size + 64) # 预留64字节的变长字段
228
270
 
229
271
  # 仅头部模式解析 LocalFileHeader
@@ -243,6 +285,14 @@ class RemoteZip:
243
285
  header.raw_extra_fields = bytes(extra_fields)
244
286
 
245
287
  header.fix_by_zip64()
288
+
289
+ if entry.has_data_descriptor:
290
+ header.compressed_size = entry.compressed_size
291
+ header.uncompressed_size = entry.original_size
292
+ header.crc32 = entry.crc32_raw
293
+
294
+ self.cached_headers[entry.filename] = header
295
+
246
296
  return header, buffer[pos:] # 返回剩余的数据部分
247
297
 
248
298
  def build_mapping(self):
@@ -253,6 +303,9 @@ class RemoteZip:
253
303
 
254
304
  :return: 构建完成的映射表
255
305
  """
306
+ if self.files is None:
307
+ raise ValueError("No files. Please call `fetch_file_list` first.")
308
+
256
309
  m = self.file_mapping = {}
257
310
  for entry in self.files:
258
311
  m[entry.filename] = entry
@@ -268,9 +321,17 @@ class RemoteZip:
268
321
 
269
322
  若是发现文件不存在,将会抛出 FileNotFoundError
270
323
 
271
- :param filename:
272
- :return:
324
+ :param filename: 文件名
325
+ :raise FileNotFoundError: 当找不到所需要的文件时抛出
326
+ :raise ValueError: 当本地没有文件列表时抛出
327
+ :return: 文件的 CDEntry 对象
273
328
  """
329
+
330
+ filename = normpath(filename)
331
+
332
+ if self.files is None:
333
+ raise ValueError("No files. Please call `fetch_file_list` first.")
334
+
274
335
  if self.file_mapping:
275
336
  return self.file_mapping[filename]
276
337
  else:
@@ -280,51 +341,117 @@ class RemoteZip:
280
341
  else:
281
342
  raise FileNotFoundError(filename)
282
343
 
283
- async def _stream_single_file(self, filename: bytes):
344
+ async def _stream_single_file(self, filename: bytes, kwargs):
284
345
  entry = self.find_file_entry(filename)
285
346
 
286
- if entry.is_encrypted:
287
- raise UnsupportedCryptoError()
288
-
289
- if entry.has_data_descriptor:
290
- raise UnsupportedDataDescriptorError()
291
-
292
347
  if not is_algorithm_available(entry.algorithm):
293
348
  raise UnsupportedAlgorithmError(entry.algorithm)
294
349
 
295
350
  header, buffer = await self.fetch_file_header(entry=entry)
296
- # print(header)
297
351
  real_data_offset = entry.local_header_offset + header.data_offset
298
352
 
353
+ if entry.has_data_descriptor:
354
+ header.compressed_size = entry.compressed_size
355
+ header.uncompressed_size = entry.original_size
356
+ header.crc32 = entry.crc32_raw
357
+
299
358
  if entry.compressed_size < len(buffer):
300
359
  raw_generator = single_chunk_wrapper(buffer[:entry.compressed_size])
301
360
  else:
302
361
  raw_generator = self._read_range_stream(real_data_offset, entry.compressed_size)
303
362
 
304
- return get_algorithm_handler(entry.algorithm)(raw_generator)
363
+ if entry.is_encrypted and entry.algorithm != 0x63: # 暂时只支持 Zip-Crypto (Legacy)
364
+ raw_generator = zipcrypto_wrapper(raw_generator, entry, header, kwargs)
365
+
366
+ # 对于 zip-aes 的支持可以作为 algorithm-handler
367
+ # 它会把 algorithm 设成 0x63,可以直接让它路由到我们的 AES 解密包装器上
305
368
 
306
- async def stream_single_file(self, filename: bytes):
369
+ return get_algorithm_handler(entry.algorithm)(raw_generator, entry, header, kwargs)
370
+
371
+ async def stream(self, filename: bytes, **kwargs):
307
372
  """
308
373
  流式读取一个压缩包内的文件
309
374
 
310
375
  :param filename: 压缩包内的文件名
311
376
  :return:
312
377
  """
313
- gen = await self._stream_single_file(filename)
378
+ gen = await self._stream_single_file(normpath(filename), kwargs)
314
379
  async for i in gen:
315
380
  yield i
316
381
 
317
- async def load_single_file(self, filename: bytes) -> bytearray:
382
+ async def read(self, filename: bytes, **kwargs) -> bytearray:
318
383
  """
319
- 直接加载文件的内容
384
+ 直接全量加载文件的内容
320
385
 
321
386
  建议在小文件上使用此方法
322
387
 
323
388
  :param filename: 压缩包内的文件名
324
- :return:
389
+ :return: 一个 bytearray 表示文件内容
325
390
  """
326
391
  buffer = bytearray()
327
- async for i in self.stream_single_file(filename):
392
+ async for i in self.stream(filename, **kwargs):
328
393
  buffer.extend(i)
329
394
 
330
395
  return buffer
396
+
397
+
398
+ async def resolve(self, filename: bytes, max_resolve=24, **kwargs) -> bytes:
399
+ entry = self.find_file_entry(filename)
400
+ target = entry.filename
401
+
402
+ cnt = 0
403
+ while entry.is_symlink:
404
+ target = await self.read(filename, **kwargs)
405
+ try:
406
+ entry = self.find_file_entry(target)
407
+ except FileNotFoundError:
408
+ break
409
+
410
+ cnt += 1
411
+
412
+ return target
413
+
414
+ def listdir(self, path: bytes) -> list[bytes]:
415
+ path = normpath(path).removesuffix(b'/') + b'/'
416
+ return [
417
+ i
418
+ for i in self.namelist()
419
+ if i.startswith(path) and i != path # 确保不会包含目录本身
420
+ ]
421
+
422
+ def exists(self, path: bytes) -> bool:
423
+ return normpath(path) in self.namelist()
424
+
425
+ def entry(self, path: bytes) -> CDEntry:
426
+ i = self.namelist().index(normpath(path))
427
+ if i == -1:
428
+ raise FileNotFoundError()
429
+
430
+ return self.files[i]
431
+
432
+ def original_size(self, path: bytes) -> int:
433
+ return self.entry(path).original_size
434
+
435
+ def compressed_size(self, path: bytes) -> int:
436
+ return self.entry(path).compressed_size
437
+
438
+ async def header(self, path: bytes):
439
+ return await self.fetch_file_header(
440
+ filename=normpath(path)
441
+ )
442
+
443
+ async def read_text(self, path: bytes, encoding='utf-8', errors='strict') -> str:
444
+ return (await self.read(path)).decode(encoding, errors=errors)
445
+
446
+ def rglob(self, pattern):
447
+ for file in self._namelist:
448
+ if fnmatch(file, pattern):
449
+ yield file
450
+
451
+ def rglob_entries(self, pattern):
452
+ if self.files is None:
453
+ raise ValueError("No files. Please call `fetch_file_list` first.")
454
+
455
+ for file in self.files:
456
+ if fnmatch(file.filename, pattern):
457
+ yield file
File without changes
@@ -0,0 +1,39 @@
1
+ # Written by DeepSeek
2
+
3
+ from cryptography.hazmat.primitives import hashes
4
+ from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes
5
+ from cryptography.hazmat.primitives.kdf.pbkdf2 import PBKDF2HMAC
6
+
7
+
8
+ def pbkdf2_hmac_impl(pwd: bytes, length: int, salt: bytes, iterations: int) -> bytes:
9
+ kdf = PBKDF2HMAC(
10
+ algorithm=hashes.SHA1(),
11
+ length=length,
12
+ salt=salt,
13
+ iterations=iterations,
14
+ )
15
+ return kdf.derive(pwd) # 注意:密码需要单独传递
16
+
17
+
18
+ class CryptographyAESCipher:
19
+ __slots__ = ('_d', )
20
+
21
+ def __init__(self, decryptor):
22
+ self._d = decryptor
23
+
24
+ @classmethod
25
+ def get_cipher(cls, enc_key: bytes):
26
+ cipher = Cipher(algorithms.AES(enc_key), modes.CTR((1).to_bytes(16, 'little')))
27
+ decryptor = cipher.decryptor()
28
+ return cls(decryptor)
29
+
30
+ def update(self, encrypted_data: bytes) -> bytes:
31
+ return self._d.update(encrypted_data)
32
+
33
+ def finalize(self) -> bytes:
34
+ return self._d.finalize()
35
+
36
+
37
+ def install():
38
+ from rtzip.zip_aes import install
39
+ install(pbkdf2_hmac_impl, CryptographyAESCipher)
@@ -0,0 +1,47 @@
1
+ # Written by DeepSeek
2
+
3
+ from Crypto.Cipher import AES
4
+ from Crypto.Protocol.KDF import PBKDF2
5
+ from Crypto.Hash import SHA1
6
+ from Crypto.Util import Counter
7
+
8
+
9
+ def pbkdf2_hmac_pycryptodome(pwd: bytes, length: int, salt: bytes, iterations: int) -> bytes:
10
+ """
11
+ 使用 PyCryptodome 的 PBKDF2 实现
12
+ """
13
+ return PBKDF2(
14
+ password=pwd,
15
+ salt=salt,
16
+ dkLen=length,
17
+ count=iterations,
18
+ hmac_hash_module=SHA1
19
+ )
20
+
21
+
22
+ class PyCryptodomeAESCipher:
23
+ __slots__ = ('_cipher',)
24
+
25
+ def __init__(self, cipher):
26
+ self._cipher = cipher
27
+
28
+ @classmethod
29
+ def get_cipher(cls, enc_key: bytes):
30
+ """
31
+ 创建 AES-CTR 解密器
32
+ """
33
+ ctr = Counter.new(128, little_endian=True, initial_value=1)
34
+ cipher = AES.new(enc_key, AES.MODE_CTR, counter=ctr)
35
+ return cls(cipher)
36
+
37
+ def update(self, encrypted_data: bytes) -> bytes:
38
+ return self._cipher.decrypt(encrypted_data)
39
+
40
+ def finalize(self) -> bytes:
41
+ # pycryptodome 的 CTR 模式没有 finalize,直接返回空
42
+ return b''
43
+
44
+
45
+ def install():
46
+ from rtzip.zip_aes import install
47
+ install(pbkdf2_hmac_pycryptodome, PyCryptodomeAESCipher)
@@ -0,0 +1,293 @@
1
+ import dataclasses
2
+ import hashlib
3
+ import hmac
4
+ from typing import Protocol
5
+
6
+ from obstruct import Struct, u16, u8
7
+
8
+ from .errors import UnsupportedAlgorithmError, WrongPasswordError
9
+ from .algorithm_register import algorithm_handler, is_algorithm_available, get_algorithm_handler
10
+
11
+
12
+ @dataclasses.dataclass(slots=True)
13
+ class AESExtraData(Struct):
14
+ vendor_version: u16
15
+ vendor_id: u16 # 2 = AE-1, 3 = AE-2
16
+ strength: u8 # 1=128bits, 2=192bits, 3=256bits
17
+ compression: u16
18
+ # mac_length: u16 # only available on AE-2
19
+
20
+
21
+ # 这些方法要求用户在初始化的时候设置,否则无法解密
22
+
23
+ _decrypt_helpers = {}
24
+
25
+
26
+ class PBKDF2_HMAC_FunctionType(Protocol):
27
+ def __call__(self, pwd: bytes, length: int, salt: bytes, iterations: int) -> bytes:
28
+ """
29
+ PBKDF2-HMAC-SHA1 实现函数
30
+
31
+ :param pwd: 解密使用的密码
32
+ :param length: 派生密钥的总长度
33
+ :param salt: 密钥盐
34
+ :param iterations: 迭代次数
35
+ :return: 一个字节串,表示派生的密钥
36
+ """
37
+ ...
38
+
39
+
40
+ from typing import Protocol, runtime_checkable
41
+
42
+
43
+ @runtime_checkable
44
+ class AESDecryptor(Protocol):
45
+ """
46
+ AES 计数器模式 (CTR) 解密器协议。
47
+
48
+ 该协议定义了 WinZip AES 加密解密所需的核心接口,
49
+ 任何实现了该协议的类型都可以用于 AES-CTR 模式解密。
50
+ """
51
+
52
+ @classmethod
53
+ def get_cipher(cls, enc_key: bytes) -> 'AESDecryptor':
54
+ """
55
+ 创建并返回一个 AES-CTR 模式解密器实例。
56
+
57
+ 该方法是工厂方法,用于初始化解密器。实现类应确保
58
+ 返回的实例处于可解密状态,并准备好处理数据。
59
+
60
+ :param enc_key: AES 加密密钥,长度必须为 16 (AES-128)、
61
+ 24 (AES-192) 或 32 (AES-256) 字节
62
+ :param iv: 初始化向量 (Initialization Vector),固定 16 字节,
63
+ 作为 AES-CTR 模式的计数器初始值
64
+ :return: 初始化完成的 AESCipher 实例
65
+ :raises ValueError: 当 enc_key 或 iv 长度不符合要求时抛出
66
+
67
+ :example:
68
+ >>> cipher = AESDecryptor.get_cipher(
69
+ ... enc_key=b'\\x00' * 32,
70
+ ... iv=b'\\x00' * 16
71
+ ... )
72
+ """
73
+ ...
74
+
75
+ def update(self, encrypted_data: bytes) -> bytes:
76
+ """
77
+ 解密一部分数据,返回解密后的明文数据。
78
+
79
+ 该方法可以多次调用,每次处理一个数据块。解密状态会
80
+ 在调用之间保持,以支持流式解密。如果 encrypted_data
81
+ 为空,返回空字节串。
82
+
83
+ :param encrypted_data: 需要解密的密文数据块,长度任意
84
+ :return: 解密后的明文数据块,长度与输入相同
85
+ :raises ValueError: 当解密器未正确初始化或处于无效状态时抛出
86
+
87
+ :example:
88
+ >>> cipher = AESDecryptor.get_cipher(enc_key, iv)
89
+ >>> plaintext1 = cipher.update(ciphertext[:1024])
90
+ >>> plaintext2 = cipher.update(ciphertext[1024:])
91
+ >>> plaintext = plaintext1 + plaintext2
92
+ """
93
+ ...
94
+
95
+ def finalize(self) -> bytes:
96
+ """
97
+ 完成解密过程,返回剩余的明文数据并清理资源。
98
+
99
+ 该方法应在所有数据通过 update() 处理完毕后调用。它会
100
+ 处理可能存在的剩余数据(对于 CTR 模式通常为空),
101
+ 并执行必要的清理工作(如清除敏感数据)。调用后,解密器
102
+ 实例应被视为不可用状态,不应再调用 update()。
103
+
104
+ :return: 剩余的明文数据(对于 AES-CTR 通常为空字节串)
105
+ :raises ValueError: 当解密器处于无效状态或已被 finalize 时抛出
106
+
107
+ :example:
108
+ >>> cipher = AESDecryptor.get_cipher(enc_key, iv)
109
+ >>> plaintext = cipher.update(ciphertext)
110
+ >>> plaintext += cipher.finalize()
111
+ """
112
+ ...
113
+
114
+
115
+ def pbkdf2_hmac_implement[T: PBKDF2_HMAC_FunctionType](func: T) -> T:
116
+ """
117
+ 注入 pbkdf2-hmac 的实现,库为了轻量,并没有选择依赖任何已有的加密库,而是将选择留给开发者
118
+ 函数接受 2 个参数:
119
+ 1. length: int 这个参数指定了派生密钥的总长度
120
+ 2. salt: 密钥的 salt
121
+
122
+ 返回一个字节串,表示派生密钥的值
123
+
124
+ :param func:
125
+ :return:
126
+ """
127
+ _decrypt_helpers['pbkdf2-hmac'] = func
128
+ return func
129
+
130
+
131
+ def aes_cipher_implement[T: type[AESDecryptor]](cls: T) -> T:
132
+ _decrypt_helpers['aes-cipher'] = cls
133
+ return cls
134
+
135
+
136
+ def call_pbkdf2_hmac(pwd: bytes, length: int, salt: bytes, iterations: int):
137
+ return _decrypt_helpers['pbkdf2-hmac'](pwd, length, salt, iterations)
138
+
139
+
140
+ def get_cipher(enc_key: bytes) -> AESDecryptor:
141
+ return _decrypt_helpers['aes-cipher'].get_cipher(enc_key)
142
+
143
+
144
+ # @algorithm_handler(0x0063)
145
+ async def zip_aes_stream_decryptor(
146
+ raw_data,
147
+ compressed_size,
148
+ aes_extra,
149
+ raw_aes_extra, pwd
150
+ ):
151
+ mac_length = 10
152
+
153
+ # print(aes_extra)
154
+ # print(raw_aes_extra, len(raw_aes_extra), aes_extra.__cstruct__.size)
155
+
156
+ if aes_extra.vendor_version == 3:
157
+ offset = aes_extra.__cstruct__.size
158
+ mac_length = int.from_bytes(
159
+ raw_aes_extra[offset:offset + 2], 'little'
160
+ )
161
+
162
+ key_len = (0, 16, 24, 32)[aes_extra.strength]
163
+ salt_len = (0, 8, 12, 16)[aes_extra.strength]
164
+
165
+ buf = bytearray()
166
+
167
+ enc_header_len = salt_len + 2
168
+
169
+ while len(buf) < enc_header_len:
170
+ buf.extend(await anext(raw_data))
171
+
172
+ salt = buf[:salt_len]
173
+ quick_check = buf[salt_len: salt_len + 2]
174
+
175
+ encrypted_data_len = compressed_size - enc_header_len - mac_length
176
+
177
+ # 获取派生密钥
178
+ key_material = call_pbkdf2_hmac(pwd, 2 * key_len + 2, salt, 1000)
179
+ enc_key = key_material[:key_len]
180
+ hmac_key = key_material[key_len:key_len * 2]
181
+ checksum = key_material[-2:]
182
+
183
+ # print(f"Vendor Version: {aes_extra.vendor_version}")
184
+ # print(f"Strenth: {aes_extra.strength}")
185
+ # print(f"User Password: {pwd}")
186
+ # print(f"Zip Salt: {salt} ({len(salt)})")
187
+ # print(F"HMAC Length: {mac_length}")
188
+ # print(F"ENC Key: {enc_key}")
189
+ # print(F"HMAC Key: {hmac_key}")
190
+ # print(F"Check: {checksum} vs. {quick_check}")
191
+
192
+ if checksum != quick_check:
193
+ raise WrongPasswordError()
194
+
195
+ # 流式解密
196
+ # 同时需要校验
197
+
198
+ cipher = get_cipher(enc_key)
199
+
200
+ h = hmac.new(
201
+ key=hmac_key,
202
+ digestmod=hashlib.sha1
203
+ )
204
+
205
+ size = len(buf) - enc_header_len
206
+
207
+ _ = buf[enc_header_len:]
208
+ yield (x := cipher.update(_)) # 先把读取AES头产生的余量数据消耗掉
209
+ h.update(_) # 更新校验值
210
+
211
+ # print("Data in Buffer", x)
212
+
213
+ buf = bytearray()
214
+
215
+ async for chunk in raw_data: # 开始遍历真正的数据
216
+ size += len(chunk) # 累计大小
217
+
218
+ if size > encrypted_data_len: # 如果:发现已接收大小超了
219
+ # print("Overflow")
220
+ # 多出来的部分的大小就是 size - encrypted_data_len
221
+ # 相对的索引就是这个值取反
222
+ # 此后就是真实的 MAC 校验值了
223
+ pos = -(size - encrypted_data_len)
224
+
225
+ yield cipher.update(chunk[:pos])
226
+ h.update(chunk[:pos])
227
+
228
+ buf.extend(chunk[pos:]) # 把剩余数据放进 buffer
229
+ # 某些极端情况下可能会产生数据差几个字节的问题
230
+ # 我们需要在后面把数据补上
231
+ break
232
+
233
+ # 否则:正常迭代、解密和更新校验值
234
+ yield cipher.update(chunk)
235
+ h.update(chunk)
236
+
237
+ # print("Get chunk {}/{}".format(size, encrypted_data_len))
238
+
239
+ # 该读取 MAC 了
240
+
241
+ while len(buf) < mac_length:
242
+ buf.extend(await anext(raw_data))
243
+
244
+ # 现在肯定够了
245
+
246
+ if len(buf) != mac_length:
247
+ raise ValueError("Unexpected extra data")
248
+
249
+ # print(f"Elpasted Size: {len(buf)}")
250
+ mac = buf[:mac_length]
251
+
252
+ digest = h.digest()[:10]
253
+ if not hmac.compare_digest(digest, mac):
254
+ # print(digest, mac, h.digest())
255
+ raise ValueError("Wrong HMAC")
256
+
257
+ try:
258
+ await anext(raw_data)
259
+ raise ValueError("Unexpect extra data")
260
+
261
+ except StopAsyncIteration:
262
+ # print("Stop")
263
+ return
264
+
265
+
266
+ def zip_aes_wrapper(raw_data, entry, header, ctx):
267
+ assert ctx.get('pwd')
268
+ assert _decrypt_helpers.get(
269
+ 'aes-cipher'
270
+ ), "You didn't register a AESCipher type, please register it by `aes_cipher_implement` decorator first"
271
+ assert _decrypt_helpers.get(
272
+ 'pbkdf2-hmac'
273
+ ), "You didn't register a PBKDF2-HMAC function, please register it by `pbkdf2_hmac_implement` decorator first"
274
+
275
+ raw_aes_extra = header.extra_fields[0x9901]
276
+ aes_extra = AESExtraData.unpack(raw_aes_extra)
277
+
278
+ # 获取解密后的压缩格式
279
+ algorithm = aes_extra.compression
280
+
281
+ if not is_algorithm_available(algorithm):
282
+ raise UnsupportedAlgorithmError(algorithm)
283
+
284
+ return get_algorithm_handler(algorithm)(
285
+ zip_aes_stream_decryptor(raw_data, entry.compressed_size, aes_extra, raw_aes_extra, ctx.get('pwd')),
286
+ entry, header, ctx
287
+ )
288
+
289
+
290
+ def install(pbkdf2_hmac: PBKDF2_HMAC_FunctionType, aes_cipher: type[AESDecryptor]):
291
+ pbkdf2_hmac_implement(pbkdf2_hmac)
292
+ aes_cipher_implement(aes_cipher)
293
+ algorithm_handler(0x0063)(zip_aes_wrapper) if not is_algorithm_available(0x0063) else None
@@ -0,0 +1,117 @@
1
+ from typing import AsyncGenerator, Any
2
+
3
+ from .models import CDEntry, LocalFileHeader
4
+
5
+ _crc_table = None
6
+
7
+
8
+ def get_crc_table():
9
+ global _crc_table
10
+ if _crc_table is None:
11
+ table = [0] * 256
12
+ for i in range(256):
13
+ crc = i
14
+ for j in range(8):
15
+ if crc & 1:
16
+ crc = 0xEDB88320 ^ (crc >> 1)
17
+ else:
18
+ crc >>= 1
19
+
20
+ table[i] = crc & 0xFFFFFFFF
21
+
22
+ _crc_table = table
23
+
24
+ return _crc_table
25
+
26
+
27
+ def crc_update_keys(pwd: bytes, k0, k1, k2):
28
+ for b in pwd:
29
+ k0, k1, k2 = crc_update_keys_byte(b, k0, k1, k2)
30
+
31
+ return k0, k1, k2
32
+
33
+
34
+ def crc_update_keys_byte(b: int, k0, k1, k2):
35
+ t = get_crc_table()
36
+
37
+ k0 = t[(k0 ^ b) & 0xFF] ^ (k0 >> 8)
38
+ k0 &= 0xFFFFFFFF
39
+
40
+ k1 = (k1 + (k0 & 0xFF)) & 0xFFFFFFFF
41
+ k1 = (k1 * 0x08088405 + 1) & 0xFFFFFFFF
42
+
43
+ k2 = t[(k2 ^ ((k1 >> 24) & 0xFF)) & 0xFF] ^ (k2 >> 8)
44
+ k2 &= 0xFFFFFFFF
45
+
46
+ return k0, k1, k2
47
+
48
+
49
+ def crc_keys_from_bytes(pwd: bytes):
50
+ k0, k1, k2 = 0x12345678, 0x23456789, 0x34567890
51
+ return crc_update_keys(pwd, k0, k1, k2)
52
+
53
+
54
+ def decrypt_byte(k2: int) -> int:
55
+ temp = k2 | 3
56
+ return ((temp * (temp ^ 1)) >> 8) & 0xFF
57
+
58
+
59
+ async def zipcrypto_wrapper(
60
+ raw_data: AsyncGenerator[bytes, None],
61
+ entry: CDEntry,
62
+ header: LocalFileHeader,
63
+ ctx: dict[str , Any]
64
+ ) -> AsyncGenerator[bytes, None]:
65
+ pwd = bytes(ctx['pwd'])
66
+
67
+ buffer = bytearray()
68
+
69
+ keys = crc_keys_from_bytes(pwd)
70
+
71
+ crc = header.crc32
72
+
73
+ # Get encrypted header
74
+ while 12 > len(buffer):
75
+ buffer.extend(await anext(raw_data))
76
+
77
+ encrypted_header = buffer[:12]
78
+ buffer = buffer[12:]
79
+
80
+ for b in range(12):
81
+ k = decrypt_byte(keys[2])
82
+ dec = encrypted_header[b] ^ k
83
+
84
+ keys = crc_update_keys_byte(dec, *keys)
85
+
86
+ if b == 11 and dec != ((crc >> 24) & 0xFF):
87
+ raise ValueError("Wrong Password")
88
+
89
+ # 开始解密文件的数据
90
+ data = bytearray()
91
+
92
+ for b in buffer:
93
+ k = decrypt_byte(keys[2])
94
+ dec = b ^ k
95
+
96
+ data.append(dec)
97
+
98
+ keys = crc_update_keys_byte(dec, *keys)
99
+
100
+ buffer.clear()
101
+ del buffer
102
+
103
+ yield bytes(data)
104
+
105
+ async for chunk in raw_data:
106
+ data.clear()
107
+
108
+ for b in chunk:
109
+ k = decrypt_byte(keys[2])
110
+ dec = b ^ k
111
+
112
+ data.append(dec)
113
+
114
+ keys = crc_update_keys_byte(dec, *keys)
115
+
116
+ yield bytes(data)
117
+
rtzip-0.3.0/LICENSE DELETED
@@ -1,28 +0,0 @@
1
- BSD 3-Clause License
2
-
3
- Copyright (c) 2026, LittleNightSong
4
-
5
- Redistribution and use in source and binary forms, with or without
6
- modification, are permitted provided that the following conditions are met:
7
-
8
- 1. Redistributions of source code must retain the above copyright notice, this
9
- list of conditions and the following disclaimer.
10
-
11
- 2. Redistributions in binary form must reproduce the above copyright notice,
12
- this list of conditions and the following disclaimer in the documentation
13
- and/or other materials provided with the distribution.
14
-
15
- 3. Neither the name of the copyright holder nor the names of its
16
- contributors may be used to endorse or promote products derived from
17
- this software without specific prior written permission.
18
-
19
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22
- DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
23
- FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24
- DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25
- SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
26
- CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
27
- OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
rtzip-0.3.0/PKG-INFO DELETED
@@ -1,7 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: rtzip
3
- Version: 0.3.0
4
- Requires-Python: >=3.12
5
- License-File: LICENSE
6
- Requires-Dist: obstruct==0.5.2
7
- Dynamic: license-file
rtzip-0.3.0/README.md DELETED
@@ -1,119 +0,0 @@
1
- # Rtzip
2
-
3
- _一个以最小的数据量提取远程 zip 文件内容的库_
4
-
5
- ## 特点
6
-
7
- - 不与任何 HTTP 库耦合
8
- - 依赖简单(只有用于解析二进制结构的 `obstruct`)
9
- - 兼容标准 zip 格式、ZIP64 扩展
10
-
11
- ## 安装
12
-
13
- ```commandline
14
- pip install rtzip
15
- ```
16
-
17
- ## 用法
18
-
19
- ### 直接使用
20
-
21
- ```python
22
- from rtzip import RemoteZip, DataSource
23
-
24
- import niquests # 如果你使用 niquests 作为 http 依赖的话
25
-
26
-
27
- class HTTPSource(DataSource):
28
- def __init__(self, url, session=None):
29
- self.url = url
30
- self.session = session or niquests.AsyncSession
31
-
32
- async def _request_range(self, offset, length):
33
- resp = await self.session.get(self.url, headers={'Range': f"bytes={offset}-{offset + length - 1}"}, stream=True)
34
- resp.raise_for_status()
35
- if resp.status_code != 206:
36
- await resp.close()
37
- raise niquests.HTTPError(response=resp)
38
- return resp
39
-
40
- async def read_range(self, offset, length):
41
- return await (await self._request_range(offset, length)).content
42
-
43
- async def read_range_stream(self, offset, length):
44
- async for i in await (await self._request_range(offset, length)).iter_content():
45
- yield i
46
-
47
- async def get_total_size(self):
48
- resp = await self.session.head(self.url)
49
- resp.raise_for_status()
50
- return int(resp['content-length'])
51
-
52
-
53
- async def main():
54
- url = ...
55
- rz = RemoteZip(HTTPSource(url))
56
- rz.fetch_zip_info() # 加载文件的 EOCD,返回一个 EOCD 获取 Zip64EOCD 对象
57
- rz.fetch_file_list() # 加载文件的中央目录,返回一个包含 CDEntry 对象的列表
58
- # 这些数据如果没有即时接收,也会被缓存在 rz.eocd 和 rz.files 中
59
-
60
- rz.build_mapping() # 构建文件名 -> Entry 对象的映射表,方便查表
61
- # 返回映射表本身,同时缓存在 rz.file_mapping 中
62
-
63
- # 一次性读取一个文件的全量数据
64
- data = await rz.load_single_file(b'filename')
65
-
66
- # 流式读取一个文件的数据
67
- buffer = bytearray()
68
- async for i in rz.stream_single_file(b'filename'):
69
- buffer.extend(i)
70
-
71
- # 获取一个文件的元数据信息
72
- entry = rz.find_file_entry(b'filename')
73
- # 可能抛出 FileNotFoundError
74
-
75
- # 从文件名拉取一个文件对应的本地文件头
76
- header = await rz.fetch_file_header(filename=b'filename')
77
-
78
- # 也可以从已有的 entry 对象拉取
79
- # 但这时你要自己保证这个 entry 对象是有效的
80
- # 将返回一个 LocalFileHeader 对象
81
- header = await rz.fetch_file_header(entry=entry)
82
-
83
-
84
- if __name__ == '__main__':
85
- import asyncio
86
-
87
- asyncio.run(main())
88
-
89
- ```
90
-
91
- ### 自定义压缩算法处理
92
-
93
- ```python
94
- # 示例:扩展 PPMd 算法支持(需要 pip install ppmd)
95
- import ppmd
96
- from rtzip import algorithm_handler
97
-
98
-
99
- @algorithm_handler(0x000A)
100
- async def ppmd_wrapper(raw_generator):
101
- # PPMd 流式解压(API 取决于具体库)
102
- decomp = ppmd.Ppmd7Decompressor()
103
- async for chunk in raw_generator:
104
- yield decomp.decompress(chunk)
105
-
106
-
107
- # 这之后使用 RemoteZip 时遇到 ppmd 算法会自动应用你的包装器
108
-
109
- # 如果想要重写某个内置的包装器
110
- # 你需要指定 `override=True`,否则程序将会阻止覆盖行为
111
- @algorithm_handler(0x0008, override=True)
112
- async def your_deflate_wrapper(raw_generator):
113
- ...
114
-
115
- ```
116
-
117
- > [!TIP]
118
- > 本库无计划新功能,若是让自行添加功能,可克隆仓库并重写 `rtzip/remotezip.py` 下的代码
119
- > 大多数库的功能已完成并可以直接投入使用
@@ -1,12 +0,0 @@
1
- [project]
2
- name = "rtzip"
3
- version = "0.3.0"
4
- requires-python = ">=3.12"
5
- dependencies = [
6
- "obstruct==0.5.2",
7
- ]
8
-
9
- [dependency-groups]
10
- dev = [
11
- "niquests>=3.21.0",
12
- ]
rtzip-0.3.0/setup.cfg DELETED
@@ -1,4 +0,0 @@
1
- [egg_info]
2
- tag_build =
3
- tag_date = 0
4
-
@@ -1,7 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: rtzip
3
- Version: 0.3.0
4
- Requires-Python: >=3.12
5
- License-File: LICENSE
6
- Requires-Dist: obstruct==0.5.2
7
- Dynamic: license-file
@@ -1,15 +0,0 @@
1
- LICENSE
2
- README.md
3
- pyproject.toml
4
- src/rtzip/__init__.py
5
- src/rtzip/algorithm_register.py
6
- src/rtzip/codec_wrappers.py
7
- src/rtzip/const.py
8
- src/rtzip/errors.py
9
- src/rtzip/models.py
10
- src/rtzip/remotezip.py
11
- src/rtzip.egg-info/PKG-INFO
12
- src/rtzip.egg-info/SOURCES.txt
13
- src/rtzip.egg-info/dependency_links.txt
14
- src/rtzip.egg-info/requires.txt
15
- src/rtzip.egg-info/top_level.txt
@@ -1 +0,0 @@
1
- obstruct==0.5.2
@@ -1 +0,0 @@
1
- rtzip
File without changes