https://github.com/lima-vm/go-qcow2reader
qcow2 reader for Go
https://github.com/lima-vm/go-qcow2reader
Last synced: 5 months ago
JSON representation
qcow2 reader for Go
- Host: GitHub
- URL: https://github.com/lima-vm/go-qcow2reader
- Owner: lima-vm
- License: apache-2.0
- Created: 2023-05-13T19:44:07.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2024-10-20T21:34:58.000Z (7 months ago)
- Last Synced: 2024-10-22T13:33:28.686Z (7 months ago)
- Language: Go
- Homepage: https://pkg.go.dev/github.com/lima-vm/go-qcow2reader
- Size: 89.8 KB
- Stars: 34
- Watchers: 6
- Forks: 6
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# go-qcow2reader
[](https://pkg.go.dev/github.com/lima-vm/go-qcow2reader)
go-qcow2reader provides [`io.ReaderAt`](https://pkg.go.dev/io#ReaderAt) for [qcow2](https://gitlab.com/qemu-project/qemu/-/blob/v8.0.0/docs/interop/qcow2.txt) images.
Use [`io.NewSectionReader`](https://pkg.go.dev/io#NewSectionReader) to wrap [`io.ReaderAt`](https://pkg.go.dev/io#ReaderAt) into [`io.Reader`](https://pkg.go.dev/io#Reader):
```go
f, _ := os.Open("a.qcow2")
defer f.Close()
img, _ := qcow2reader.Open(f)
r := io.NewSectionReader(img, 0, img.Size()))
```The following features are not supported yet:
- [AES](https://gitlab.com/qemu-project/qemu/-/blob/v8.0.0/docs/interop/qcow2.txt#L411-L421)
- [LUKS](https://gitlab.com/qemu-project/qemu/-/blob/v8.0.0/docs/interop/qcow2.txt#L423-L429)
- [External data](https://gitlab.com/qemu-project/qemu/-/blob/v8.0.0/docs/interop/qcow2.txt#L106-L116)The following features are experimentally supported:
- [Extended L2 Entries](https://gitlab.com/qemu-project/qemu/-/blob/v8.0.0/docs/interop/qcow2.txt#L122-L126)