---
source: https://iinventedlight.com/library/notes/go-archive-zip.md
title: "Go archive/zip: read and write ZIP archives"
license: CC-BY-4.0
license_url: https://creativecommons.org/licenses/by/4.0/
source_license: "BSD-3-Clause (Go docs); BSD-3-Clause (Go source); prose restates cited source lines in own words"
license_family: mixed-green
attribution: "Summary by iinventedlight (AI-assisted). Sources: Go docs, archive/zip package; Go source, zip reader.go. BSD-3-Clause (https://go.dev/LICENSE). Copyright The Go Authors."
author: "iinventedlight (synthesis of cited sources); text drafted with AI assistance"
date: 2026-11-18
status: published
approved_by: "Cole Withington, 2026-11-20 13:14 PT: \"Publish the full batch and rewrite the 6 live notes\""
checked_on: 2026-11-18
as_of: 2026-11-18
confidence: medium
untested: "Not reproduced (2026-11-18). Official docs and source files were read; no test suite, server, or API call was run for this note."
category: coding-references
topic_area: "code-systems: go archive zip"
tags: [go, zip, archive, reader, writer]
client: Librarian
sources:
  - id: S1
    title: "archive/zip package"
    publisher: Go docs
    url: https://pkg.go.dev/archive/zip
    accessed: 2026-11-18
    license: "BSD-3-Clause"
  - id: S2
    title: "zip reader.go"
    publisher: Go source
    url: https://raw.githubusercontent.com/golang/go/master/src/archive/zip/reader.go
    accessed: 2026-11-18
    license: "BSD-3-Clause"
---
# Go archive/zip: read and write ZIP archives
**Answer:** Package zip provides support for reading and writing ZIP archives. This package does not support disk spanning. File content can be accessed by calling File.Open. Multiple files may be read concurrently.

## Examples

```go
r, err := zip.OpenReader("a.zip")
```

## Notes

See the ZIP specification for details.

## Reference list

- `archive/zip` reads and writes ZIP archives.
- `disk spanning` is not supported.
- `File.Open` is how you access a file's content.

## See also

- [go-testing](https://iinventedlight.com/library/notes/go-testing/)
- [go-slices](https://iinventedlight.com/library/notes/go-slices/)
- [go-error-handling](https://iinventedlight.com/library/notes/go-error-handling/)

## Claims

- id: C1
  claim: Package zip provides support for reading and writing ZIP archives.
  source: S1
  evidence: "Package zip provides support for reading and writing ZIP archives."

- id: C2
  claim: This package does not support disk spanning.
  source: S1
  evidence: "This package does not support disk spanning."

- id: C3
  claim: File content can be accessed by calling File.Open.
  source: S2
  evidence: "The file content can be accessed by calling [File.Open]."

## Sources

- [S1] archive/zip package. Go docs. https://pkg.go.dev/archive/zip . License: BSD-3-Clause. Accessed 2026-11-18.

- [S2] zip reader.go. Go source. https://raw.githubusercontent.com/golang/go/master/src/archive/zip/reader.go . License: BSD-3-Clause. Accessed 2026-11-18.

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: Go docs, archive/zip package; Go source, zip reader.go. BSD-3-Clause (https://go.dev/LICENSE). Copyright The Go Authors. Text was condensed and changed from the originals.

---

Agents: [/agents.md](/agents.md) | [/.well-known/agent-library.json](/.well-known/agent-library.json).
