{"id":37149593,"url":"https://github.com/metawav/chunk","last_synced_at":"2026-01-14T17:40:02.071Z","repository":{"id":51367969,"uuid":"349736551","full_name":"metawav/chunk","owner":"metawav","description":"Library for reading chunked media container files like RIFF / AIFF.","archived":false,"fork":false,"pushed_at":"2021-05-13T08:21:16.000Z","size":149,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-06-20T22:35:38.994Z","etag":null,"topics":["aiff","audio","bext","bwf","ixml","metadata","riff","wav","wave"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/metawav.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}},"created_at":"2021-03-20T13:44:13.000Z","updated_at":"2024-06-20T22:35:38.996Z","dependencies_parsed_at":"2022-08-25T12:51:59.218Z","dependency_job_id":null,"html_url":"https://github.com/metawav/chunk","commit_stats":null,"previous_names":["pmoule/wav"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/metawav/chunk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metawav%2Fchunk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metawav%2Fchunk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metawav%2Fchunk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metawav%2Fchunk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/metawav","download_url":"https://codeload.github.com/metawav/chunk/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metawav%2Fchunk/sbom","scorecard":{"id":638014,"data":{"date":"2025-08-11","repo":{"name":"github.com/metawav/chunk","commit":"1c7a9d62b45b9162d501d353b42b9856a50e85b4"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.4,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/go_build_and_test.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":0,"reason":"Found 0/29 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/go_build_and_test.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/metawav/chunk/go_build_and_test.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/go_build_and_test.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/metawav/chunk/go_build_and_test.yml/main?enable=pin","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":9,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Warn: project license file does not contain an FSF or OSI license."],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 2 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-21T09:50:05.869Z","repository_id":51367969,"created_at":"2025-08-21T09:50:05.870Z","updated_at":"2025-08-21T09:50:05.870Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28428908,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T16:38:47.836Z","status":"ssl_error","status_checked_at":"2026-01-14T16:34:59.695Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["aiff","audio","bext","bwf","ixml","metadata","riff","wav","wave"],"created_at":"2026-01-14T17:40:01.441Z","updated_at":"2026-01-14T17:40:02.062Z","avatar_url":"https://github.com/metawav.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# chunk \n![Build](https://github.com/metawav/chunk/actions/workflows/go_build_and_test.yml/badge.svg)\n[![GoDoc](https://godoc.org/github.com/metawav/chunk?status.svg)](https://godoc.org/github.com/metawav/chunk)\n\nLibrary for decoding and encoding chunked audio containers like RIFF / AIFF.\n\n## Features\n- Supported formats: \n  - Waveform Audio File Format (WAVE)\n  - Broadcast Wave Format (BWF)\n  - Audio Interchange File Format (AIFF, AIFF-C)\n- Supported chunks (Decode / Encode)\n  - 'fmt ' - WAVE format and PCM format\n  - 'COMM' - Common\n  - 'bext' - Broadcast Extension for sound metadata in BWF (version 0, 1, 2)\n  - 'iXML' - Extension for sound metadata in BWF (iXML Specification Revision 2.10)\n- Decode headers of unknown chunks\n- Encode custom header\n- Byte array presentation of known chunks for further processing\n\n## Prerequisites\nDownload and install `chunk` into your GOPATH.\n```\ngo get github.com/metawav/chunk\n```\nImport the package to get started.\n```go\nimport \"github.com/metawav/chunk\"\n```\n## Examples\n### Read headers from RIFF (.wav) file\n```go\nfileName := \"sample.wav\"\nfile, err := os.Open(fileName)\n\nif err != nil {\n    panic(err)\n}\n\ndefer file.Close()\n\nreader := io.ReadSeeker(file)\ncontainer, _ := chunk.ReadRiff(file.Name(), reader)\n\nfor _, header := range container.Headers {\n    fmt.Printf(\"%s\\n\", header)\n}\n```\nExample output:\n```\nID: fmt  Size: 16 FullSize: 24 StartPos: 12 HasPadding: false\nID: data Size: 88200 FullSize: 88208 StartPos: 36 HasPadding: false\nID: LIST Size: 68 FullSize: 76 StartPos: 88244 HasPadding: false\nID: JUNK Size: 10 FullSize: 18 StartPos: 88320 HasPadding: false\n```\n### Find and decode format chunk\n```go\nheaders := container.FindHeaders(\"fmt \") // keep care of trailing space :)\nchunkBytes := make([]byte, headers[0].FullSize())\n_, err = file.ReadAt(chunkBytes, int64(headers[0].StartPos()))\n\nif err != nil {\n    //handle err\n}\n\nformat, err := chunk.DecodePCMFormatChunk(chunkBytes)\n\nif err != nil {\n    //handle err\n}\n\nfmt.Printf(\"%s\\n\", format)\n```\nExample output:\n```\nFormat: 1\nChannels: 1\nSample rate: 44100\nByte rate: 88200\nBytes per sample: 2\nBits per sample: 16\n```\n### Encode format chunk\n```go\nformat = chunk.EncodePCMFormatChunk(16, 1, 1, 44100, 88200, 2, 24)\nfmt.Printf(\"%s\\n\", format)\n```\nExample output:\n```\nFormat: 1\nChannels: 1\nSample rate: 44100\nByte rate: 88200\nBytes per sample: 2\nBits per sample: 24\n```\n### Get bytes representation of format chunk\n```go\nformat = chunk.EncodePCMFormatChunk(16, 1, 1, 44100, 88200, 2, 24)\nfmt.Printf(\"%08b\\n\", format.Bytes())\n```\nExample output:\n```\n[\n01100110 01101101 01110100 00100000 // ID               = \"fmt \"\n00010000 00000000 00000000 00000000 // size             = 16\n00000001 00000000                   // format           = 1\n00000001 00000000                   // channels         = 1\n01000100 10101100 00000000 00000000 // samples per sec  = 44100\n10001000 01011000 00000001 00000000 // bytes per sec    = 88200\n00000010 00000000                   // block align      = 2\n00011000 00000000                   // bits per sample  = 24\n]\n```\n## Documentation\nSee package documentation:\n\n[![GoDoc](https://godoc.org/github.com/metawav/chunk?status.svg)](https://godoc.org/github.com/metawav/chunk)\n\n## License\n`chunk` is released under Apache License, Version 2.0. See [LICENSE](LICENSE.txt).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmetawav%2Fchunk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmetawav%2Fchunk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmetawav%2Fchunk/lists"}