blob: 512f2a8bcd98e9b8cfe10d207d823db3400ceb55 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
---
.title = "Zipdl",
.author = "Martin Ashby",
.date = @date("2023-10-07T23:28:16+01:00"),
.layout = "single.html",
.custom = {"comments": true},
---
I wrote a small program for downloading individual files from a remote ZIP file on a http server that supports [Range](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Range) requests. This was an interesting learning exercise.
In case it's useful to anyone, the code is available at https://code.mfashby.net/zipdl/
Binary releases:
* [linux aarch64](https://dl.mfashby.net/zipdl/0.0.1/aarch64-linux-gnu/zipdl.xz) [checksum](https://dl.mfashby.net/zipdl/0.0.1/aarch64-linux-gnu/zipdl.xz.sha256)
* [linux x86_64](https://dl.mfashby.net/zipdl/0.0.1/x86_64-linux-gnu/zipdl.xz) [checksum](https://dl.mfashby.net/zipdl/0.0.1/x86_64-linux-gnu/zipdl.xz.sha256)
Download the appropriate file for your platform and the checksum, then check and extract:
```
sha256sum -c zipdl.xz.sha256
# result MUST be zipdl.xz: OK
unxz zipdl.xz
```
and run with -h for help
```
./zipdl -h
```
To build from source, download the code, download [zig](https://ziglang.org/download/), and run `zig build` to produce a binary in zig-out/bin folder.
|