Skip to content

Add NosArchive read/write for legacy .NOS containers#115

Merged
erwan-joly merged 1 commit intomasterfrom
feat/nos-archive-read-write
Apr 23, 2026
Merged

Add NosArchive read/write for legacy .NOS containers#115
erwan-joly merged 1 commit intomasterfrom
feat/nos-archive-read-write

Conversation

@erwan-joly
Copy link
Copy Markdown
Contributor

@erwan-joly erwan-joly commented Apr 23, 2026

Summary

  • Exposes a public static NosArchive type with Read(byte[]) / Write(IReadOnlyList<Entry>) for the legacy file-list + XOR-obfuscated payload layout used by NScliData_*.NOS, NSlangData_*.NOS, etc.
  • Each entry preserves its Id and the unknown 4-byte header field verbatim so round-trips are byte-faithful after decryption.
  • Version bumped 4.0.0 → 4.1.0 (new public API).

Consumers can now rewrite strings inside inner files (e.g. the NosMall URL in conststring.dat) and repack without shelling out to external tools like OnexExplorer.

Test plan

  • Builds with TreatWarningsAsErrors=true + GenerateDocumentationFile=true
  • Round-trip test: ReadWriteRead produces decrypted-content-identical entries on NScliData_FR.NOS
  • Tag 4.1.0 to trigger NuGet release via .github/workflows/dotnet.yml

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Added support for reading and writing legacy NosTale .NOS archive files with encryption/decryption capabilities for archive contents.
  • Chores

    • Version updated to 4.1.0

Exposes a public static NosArchive type with Read(byte[]) / Write(IReadOnlyList<Entry>)
handling the legacy file-list + XOR-obfuscated payload layout (NScliData_*.NOS,
NSlangData_*.NOS, etc). Preserves the per-entry Id and the unknown 4-byte field
verbatim so round-trips are byte-faithful after decryption.

Useful for tooling that needs to rewrite strings inside conststring.dat (e.g. the
NosMall URL) and repack without shelling out to external tools.

Bump version to 4.1.0 (new public API).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 23, 2026

Caution

Review failed

Pull request was closed or merged during review

Walkthrough

A new NosArchive static utility class is added to handle legacy NosTale .NOS archive format parsing and serialization. It includes an Entry record and Read/Write methods for decrypting and encrypting archive contents. The project version is incremented to 4.1.0.

Changes

Cohort / File(s) Summary
Archive Format Handler
src/NosCore.ParserInputGenerator/Extractor/NosArchive.cs
New utility class providing Read method to parse .NOS archives with decryption (handling 0xFF sentinel expansion, packed-nibble mode, and XOR operations), and Write method to serialize entries back with encryption logic (chunked processing, 0x0D mapping).
Project Configuration
src/NosCore.ParserInputGenerator/NosCore.ParserInputGenerator.csproj
Version bump from 4.0.0 to 4.1.0.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding read/write functionality for legacy .NOS archive containers, which is the primary focus of the changeset.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/nos-archive-read-write

Comment @coderabbitai help to get the list of available commands and usage tips.

@erwan-joly erwan-joly merged commit 9131415 into master Apr 23, 2026
2 of 3 checks passed
@erwan-joly erwan-joly deleted the feat/nos-archive-read-write branch April 23, 2026 11:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant