{"id":51422144,"url":"https://github.com/pbs-plus/go-mtf","last_synced_at":"2026-07-05T00:30:27.559Z","repository":{"id":365367538,"uuid":"1271770065","full_name":"pbs-plus/go-mtf","owner":"pbs-plus","description":"A pure-Go library for reading Microsoft Tape Format  (MTF) streams","archived":false,"fork":false,"pushed_at":"2026-06-28T16:50:26.000Z","size":2144,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-28T18:22:02.530Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pbs-plus.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-17T02:03:59.000Z","updated_at":"2026-06-28T16:50:29.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/pbs-plus/go-mtf","commit_stats":null,"previous_names":["pbs-plus/go-mtf"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pbs-plus/go-mtf","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pbs-plus%2Fgo-mtf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pbs-plus%2Fgo-mtf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pbs-plus%2Fgo-mtf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pbs-plus%2Fgo-mtf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pbs-plus","download_url":"https://codeload.github.com/pbs-plus/go-mtf/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pbs-plus%2Fgo-mtf/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35140188,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-04T02:00:05.987Z","response_time":113,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-07-05T00:30:23.623Z","updated_at":"2026-07-05T00:30:27.497Z","avatar_url":"https://github.com/pbs-plus.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-mtf\n\n[![Go Reference](https://pkg.go.dev/badge/github.com/pbs-plus/go-mtf.svg)](https://pkg.go.dev/github.com/pbs-plus/go-mtf)\n\nA pure-Go library for reading **Microsoft Tape Format (MTF)** streams - the\nformat produced by `NTBACKUP.EXE` and commonly found in `.bkf` backup files.\n\nFeatures media spanning, transparent decompression, sparse reconstruction,\nMedia Based Catalog parsing, and near-zero-allocation classification.\n\n## Features\n\n- **Typed block iterator** - `Next` yields media/set/entry/set-end blocks; a\n  medium's role is self-evident from the sequence.\n- **Faithful extraction** - NTFS security descriptors, extended attributes,\n  sparse maps, and *every* remaining stream are auto-materialized onto the\n  `Header`; sparse files are reconstructed (holes zero-filled).\n- **Transparent decompression** - Stac LZS (`MTF_LZS221`) and the\n  compression/encryption frame layer; encryption via a pluggable decryptor\n  (the spec defines no cipher).\n- **Multi-media spanning** — reassembles a data set split across media,\n  including mid-file splits. The `Continuation` callback gives the application\n  full context (tape name, family ID, sequence) to prompt an operator.\n- **Media Based Catalog** - standard Type 1 Set Map / File/Directory Detail\n  parsing, auto-detected Backup Exec XML catalogs, and a `becatalog` companion\n  for vendor-specific payloads.\n- **Media family identification** - `Family()` combines the TAPE block and Set\n  Map to tell you the family ID, total tape count, and which data sets live on\n  which tapes. Essential for the \"I have one tape, what do I need?\" use case.\n\n## Quick start\n\n```go\nr, err := mtf.Open(\"backup.bkf\")\nif err != nil { log.Fatal(err) }\ndefer r.Close()\n\nfor {\n\tb, err := r.Next()\n\tif err == io.EOF { break }\n\tif err != nil { log.Fatal(err) }\n\n\tswitch b.Kind {\n\tcase mtf.KindEntry:\n\t\tfmt.Println(b.Header.Name)\n\t\tif b.Header.Type == mtf.EntryFile {\n\t\t\tio.Copy(os.Stdout, r) // stream file content\n\t\t}\n\tcase mtf.KindSetEnd:\n\t\tfmt.Println(\"data set ended; catalog:\", b.Catalog != nil)\n\t}\n}\n```\n\n## Documentation\n\nFull reference lives in [`docs/`](./docs):\n\n- [Quick start](./docs/quickstart.md) - open, list, extract\n- [Reader API](./docs/reader.md) - `Next`/`Read`, block kinds, `Header` fields\n- [Data streams](./docs/streams.md) - metadata, sparse, compression/encryption\n- [Media Based Catalog](./docs/catalog.md) - Set Map, FDD, `CatalogData`\n- [Spanning](./docs/spanning.md) - multi-media continuation with operator prompts\n- [LTO tapes](./docs/lto.md) - reading from LTO tape drives\n- [Backup Exec catalogs](./docs/becatalog.md) - the `becatalog` package\n- [Census](./docs/census.md) - cartridge classification\n- [Performance](./docs/performance.md) - allocation strategy \u0026 benchmarks\n- [Architecture](./docs/architecture.md) - package layout \u0026 reader pipeline\n- [Spec reference](./docs/spec.md) - MTF field offsets \u0026 checksums\n\n## Command-line tools\n\nThese are small utilities built on the library, primarily for surveying\narchives:\n\n| Tool | Purpose |\n| --- | --- |\n| `cmd/bkfscan` | Parallel `.bkf` surveyor using `Census`. |\n| `cmd/bkfcensus` | Single-file `Census` reporter. |\n\n```\nbkfscan /mnt/archive/BEData          # survey\n```\n\n## Project layout\n\n```\ngo-mtf/\n  mtf.go          public types \u0026 constants\n  reader.go       the block iterator\n  header.go       field accessors \u0026 offsets\n  strings.go      MTF string decoding\n  datetime.go     date/time decoding\n  streams.go      data-stream materialization \u0026 sparse\n  catalog.go      Media Based Catalog (standard)\n  spanning.go     multi-media continuation\n  compress.go     compression/encryption frames\n  lzs.go          Stac LZS decompressor\n  census.go       cartridge classification\n  becatalog/      Backup Exec XML catalog parser\n  cmd/            bkfscan, bkfcensus (survey utilities)\n  docs/           detailed documentation\n```\n\n## License\n\nMIT. See [LICENSE](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpbs-plus%2Fgo-mtf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpbs-plus%2Fgo-mtf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpbs-plus%2Fgo-mtf/lists"}