{"id":17944908,"url":"https://github.com/sewer56/afslib","last_synced_at":"2025-03-24T18:32:28.577Z","repository":{"id":94519893,"uuid":"230715911","full_name":"Sewer56/AfsLib","owner":"Sewer56","description":"A simple .NET library for reading and writing CRIWare AFS archives.","archived":false,"fork":false,"pushed_at":"2023-12-07T23:18:11.000Z","size":2383,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-04T08:19:44.715Z","etag":null,"topics":["afs","archive","cri","criware","csharp","tool","tools"],"latest_commit_sha":null,"homepage":null,"language":"C#","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/Sewer56.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null},"funding":{"github":"Sewer56"}},"created_at":"2019-12-29T07:07:20.000Z","updated_at":"2024-03-14T03:50:04.000Z","dependencies_parsed_at":"2023-12-08T00:35:22.983Z","dependency_job_id":null,"html_url":"https://github.com/Sewer56/AfsLib","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sewer56%2FAfsLib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sewer56%2FAfsLib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sewer56%2FAfsLib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sewer56%2FAfsLib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Sewer56","download_url":"https://codeload.github.com/Sewer56/AfsLib/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221997290,"owners_count":16913723,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["afs","archive","cri","criware","csharp","tool","tools"],"created_at":"2024-10-29T06:05:40.792Z","updated_at":"2024-10-29T06:05:41.286Z","avatar_url":"https://github.com/Sewer56.png","language":"C#","funding_links":["https://github.com/sponsors/Sewer56"],"categories":[],"sub_categories":[],"readme":"# AfsLib\n\nA simple, relatively fast library for the reading and writing of CRIWare AFS archives.\n\n## Usage\n\n### Previewing an AFS File\nYou can preview an AFS file by creating an instance of `AfsFileViewer`.\nIn this mode, the AFS file is directly loaded from memory. No copying is done, allowing you to quickly inspect the structure of the AFS archive..\n\n```csharp\nvar data = File.ReadAllBytes(afsFilePath);\nif (AfsFileViewer.TryFromFile(data, out var afsViewer)) \n{\n\t// Do stuff.\n};\n```\n\n### Reading data from a single entry in an AFS File\nTo get the data from a single entry inside an AFS with minimal memory footprint, use the static method:\n```csharp\nAfsArchive.SeekToAndLoadDataFromIndex(stream, index)\n```\n\n\nThis will seek through the file and return a byte[] containing just the data at that index.\nThis is useful for large AFS with one-off reads.\n\n\n### Editing an AFS File\nTo edit an AFS file, create an instance of `AfsArchive`.\n`AfsArchive` reads all of the data from an `AfsFileViewer`, converting it into a format easier to edit for the end user.\n\n```csharp\nvar data = File.ReadAllBytes(afsFilePath);\nif (AfsArchive.TryFromFile(data, out var afsArchive)) \n{\n\t// Do stuff.\n};\n```\n\nTo convert the file back to bytes, use the `ToBytes` method.\n\n```csharp\nafsArchive.ToBytes();\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsewer56%2Fafslib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsewer56%2Fafslib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsewer56%2Fafslib/lists"}