Guides · Info-ZIP

Verify a caption ZIP against the files your client actually requested

Published

By ToolBrivio Editorial.

A ZIP that opens without errors can still be the wrong caption delivery. Our test bundle passed a compressed-data check while missing VTT, and updating its reused filename retained a deleted note. Before sending the file, check the archive against the request rather than against a success message.

Write down the required paths

For this example, assume the client asked for these exact files:

delivery/captions.srt
delivery/captions.vtt
delivery/notes.txt

Put only final delivery assets in the folder. Use the notes file to identify the final video filename and language. Do not include alternate drafts, private working transcripts or credentials. If the requested paths differ, change the manifest instead of renaming blindly.

Create a new archive name

zip -r delivery-final-v2.zip delivery

Choose a path that does not already exist. Our local test showed that rerunning zip -r on an existing archive retained a note deleted from the source folder. A new archive reflects the files read for that creation, but it still needs an explicit contents check.

Check completeness without extracting

This Python 3 script lists missing and unexpected file paths. It ignores directory-only entries and refuses a wrong manifest:

from pathlib import Path
from zipfile import ZipFile

required = {
    "delivery/captions.srt",
    "delivery/captions.vtt",
    "delivery/notes.txt",
}
with ZipFile("delivery-final-v2.zip") as archive:
    names = [item.filename for item in archive.infolist() if not item.is_dir()]
    actual = set(names)
    missing = required - actual
    extra = actual - required
    duplicate = len(names) != len(actual)
    if missing or extra or duplicate:
        raise SystemExit(f"Missing: {sorted(missing)}; unexpected: {sorted(extra)}; duplicates: {duplicate}")
    for name in sorted(required):
        if archive.read(name) != Path(name).read_bytes():
            raise SystemExit(f"Source bytes differ: {name}")
print("Required paths and source bytes match.")

Run it from the directory containing the delivery folder and archive. In our incomplete fixture it rejected the missing VTT; a matching three-file fixture passed. The byte check detects a packaged file that differs from the local version. It cannot tell whether both versions contain the same editorial mistake.

Integrity and editorial checks remain separate

On a trusted archive you created, an integrity check can catch compressed-data problems:

unzip -t delivery-final-v2.zip

Our test returned success even when the required VTT was absent. Completeness comes from the manifest check; caption correctness comes from opening the final SRT and VTT and reviewing their text, intervals and match with the video. Do not use an archive test as a malware scanner or permission to extract an untrusted file.

Keep the verification result with the handoff

Record the archive filename, final video identifier, requested language and verification outcome in your own delivery notes. If you rebuild, rerun the checks against that exact new archive. This procedure does not encrypt the files, upload them or verify the recipient’s software.

We tested small local English captions with Zip 3.0, UnZip 6.00 and Python 3 on Ubuntu. No large-file, Unicode-filename, recipient-platform or hostile-archive cases were exercised. Read the Info-ZIP test report, Python ZIP documentation and software profile before adapting this to another workflow.

The ToolBrivio digest

Better software choices, in your inbox.

A weekly selection of software reviews and practical guides. Launching soon — leave your email to join the waitlist.