Commit graph

9 commits

Author SHA1 Message Date
ccc7228278
fix: avoid duplicate directory entries with trailing slash
Fixed a bug in the directory tree builder where for directories there
would be two entries, where one would have a trailing slash, and the
other wouldn't.

The directory without the trailing slash would get linked to its
children in the entries lookup table, while the one with the trailing
slash would exist as a "ghost directory" with no children.

The fix involved sorting the entries to first handle directories, and
linking to the existing parent directory entries for children.
2024-12-31 12:46:45 +00:00
7724af0467
refactor: removing debugging prints lol 2024-12-31 06:12:30 +00:00
ba82ad4af3
fix: correctly check bitflag for "streaming" zips 2024-12-31 06:11:45 +00:00
3a3a0e9aed
feat: add "streaming" zip support
Adds support for ZIP files with the `0x08` bit of the general purpose
bitflags set, i.e, those which do not include file sizes and crc
checksums in the local file header
2024-12-30 18:24:00 +00:00
10a399c91f
refactor: minor sylistic changes
Swaps places with the pattern:
```luau
x = x + 1
```

to use:
```luau
x += 1
```
2024-12-30 11:26:22 +00:00
c2e638cbec
style: apply stylua formatter 2024-12-30 11:13:57 +00:00
681b9ce1bf
feat: implement decompression and extraction
* Implements a decompression step for extraction, currently supporting
  `DEFLATE` and `STORED`
* Moved testing file to `examples/`
* Added validation step to `ZipReader:extract` with options to
  optionally skip it (matches checksum and uncompressed size)
2024-12-30 11:09:48 +00:00
df134c31e0
refactor: include code comments 2024-12-28 18:01:17 +00:00
b3777ba2b1
chore: init, the basics
Implement core `ZipReader`, `ZipEntry` and basic API. Supports simple
zip format deserialization, without advanced features, or decompression.
2024-12-28 17:19:37 +00:00