Erofs
Description
EROFS fs.FS implementation for Go programs
Installation
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open the source below and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
README
erofs
Pure-Go [EROFS](https://erofs.docs.kernel.org/en/latest/) (Enhanced Read-Only File System) reader and writer. Read EROFS images through Go's `fs.FS` interface, or create new ones with `Builder`. Output is bytewise compatible with the Linux kernel EROFS driver and `mkfs.erofs`.
Reads LZ4, LZMA, DEFLATE, and Zstandard compressed images. Writes LZ4 compressed images with automatic incompressibility detection.
Install
go get github.com/Xe/erofs@latest
Reading an EROFS image
`erofs.Open` accepts any `io.ReaderAt` and returns an `*erofs.FS` implementing `fs.FS`, `fs.StatFS`, and `fs.ReadLinkFS`:
package main
import (
"fmt"
"io/fs"
"log"
"os"
"github.com/Xe/erofs"
)
func main() {
f, err := os.Open("rootfs.erofs")
if err != nil {
log.Fatal(err)
}
defer f.Close()
fsys, err := erofs.Open(f)
if err != nil {
log.Fatal(err)
}
// Read a file.
data, err := fs.ReadFile(fsys, "etc/hostname")
if err != nil {
log.Fatal(err)
}
fmt.Println(string(data))
// List a directory.
entries, err := fs.ReadDir(fsys, "usr/bin")
if err != nil {
log.Fatal(err)
}
for _, e := range entries {
fmt.Println(e.Name())
}
// Stat a file.
info, err := fsys.Stat("etc/passwd")
if err != nil {
log.Fatal(err)
}
fmt.Printf("%s: %d bytes\n", info.Name(), info.Size())
// Read a symlink.
target, err := fsys.ReadLink("usr/bin/vi")
if err != nil {
log.Fatal(err)
}
fmt.Println("vi ->", target)
}
Creating an EROFS image
`erofs.NewBuilder` writes to any `io.WriterAt`. Add files individually or walk an existing `fs.FS`:
package main
import (
"log"
"os"
"time"
"github.com/Xe/erofs"
)
func main() {
out, err := os.Create("output.erofs")
if err != nil {
log.Fatal(err)
}
defer out.Close()
b := erofs.NewBuilder(out,
erofs.WithBlo
Related Skills
Auto Update
Pull the latest ECC repo changes and reinstall the current managed targets.
Development Ecc Guide
Navigate ECC's current agents, skills, commands, hooks, install profiles, and docs from the live repository su
Development Epic Claim
Claim an epic issue, stamp coordination state, and sync local ownership.
Development Epic Publish
Publish a validated epic update back to the issue and local cache.
Development Epic Review
Mark epic review requested, approved, or changes requested.
Development Epic Unblock
Sweep blocked epic issues and reopen anything whose dependencies are closed.
Development Related Agents
Django Build Resolver
Django/Python build, migration, and dependency error resolution specialist. Fixes pip/Poetry errors, migration
Openai Codex CLI
(55.8k ⭐) - Lightweight coding agent that runs in your terminal.
src/agents/ — 11 Agent Definitions
**Generated:** 2026-04-11