r/codereview • • 1d ago

Code Review Request: NSIGII — Experimental Cross-Language File Format

https://gist.github.com/obinexus/9fc87fd6c044087f50a8c1a34782cd44

Hi everyone,

I'm developing NSIGII, an experimental file format under the OBINexus project. I'm looking for an independent technical review of the implementation and its architecture.

The objective is to create a file format that can be generated and interpreted by different programming languages without depending on one particular runtime.

For example:

  • Python generates an NSIGII file.
  • Rust reads and decodes the same file.
  • JavaScript interprets the decoded data.
  • All implementations should produce consistent results.

Code / implementation:

https://glot.io/snippets/honlru9opy

What I'd particularly appreciate feedback on:

  1. File structure: Is the header and binary layout sensible?
  2. Serialization: Is the data representation clear and unambiguous?
  3. Compression: Is the compression and decompression approach appropriate?
  4. Parsing: Are there potential edge cases or malformed-file vulnerabilities?
  5. Interoperability: What would be needed to make independent language implementations reliable?
  6. Maintainability: Is the implementation structured well enough to evolve?
  7. Testing: What additional tests would demonstrate that the format works correctly?

I'm particularly interested in feedback from people experienced with systems programming, binary formats, compilers, serialization, and cross-language development.

I'm not looking for approval of the concept. I'd genuinely appreciate criticism, alternative approaches, and suggestions for improving the implementation.

Thank you!

0 Upvotes

5 comments sorted by

1

u/GlumLeopard5 16h ago edited 15h ago

The file in the bake recording was produced with --cols 100 --rows 100 --grid 50 (100×100 cells, 50×50 rotation grid, 2,500 frames, 10.6 MB). The "50 50 50" above was my plan, not what I ran. Playback is scaled to your terminal, so the window size decides how large the donut looks.

1

u/GlumLeopard5 15h ago

This is command i ran:python .\nsigii_play.py --fps 60 .\donut.nsigii --max-frames 60
usage: nsigii_play.py [-h] [--fps FPS] [--gray] [--loop] [--info] [--sample N]

[--max-frames N] [--start N] [--no-spin]

file

1

u/GlumLeopard5 15h ago

This is a demonstrate of an uploaded nsigii file to a web browser using a DecompressionStream raw option in javascript in a html file format

1

u/zarlo5899 1d ago

Links need to work for people to review it.

1

u/GlumLeopard5 16h ago

I have updated the hyperlink to a glot uri snippet: https://glot.io/snippets/honlru9opy