Skip to content

Commit

Permalink
ziptools.py: doctest++
Browse files Browse the repository at this point in the history
  • Loading branch information
obfusk committed Oct 15, 2024
1 parent 19f9b08 commit fbedc7d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ziptools.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,13 +129,16 @@
... for filename, entry in zf.cd_entries_by_name.items():
... entry
... zf.read(entry).decode()
... zf.compression_level(entry)
True
ZipCDEntry(version_created=788, version_extract=20, flags=8, compression_method=0, mtime=44338, mdate=22809, crc32=2356372769, compressed_size=3, uncompressed_size=3, start_disk=0, internal_attrs=0, external_attrs=25165824, header_offset=0, filename=b'foo', extra=b'', comment=b'')
'foo'
ZipCDEntry(version_created=788, version_extract=20, flags=2048, compression_method=8, mtime=0, mdate=0, crc32=1996459178, compressed_size=5, uncompressed_size=3, start_disk=0, internal_attrs=0, external_attrs=0, header_offset=52, filename=b'bar', extra=b'', comment=b'')
'bar'
[9, 6, 4, 1]
ZipCDEntry(version_created=788, version_extract=20, flags=2048, compression_method=8, mtime=0, mdate=0, crc32=2015626392, compressed_size=5, uncompressed_size=3, start_disk=0, internal_attrs=0, external_attrs=0, header_offset=90, filename=b'baz', extra=b'', comment=b'')
'baz'
[9, 6, 4, 1]
"""

Expand Down

0 comments on commit fbedc7d

Please sign in to comment.