Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rustfoil generates extra characters #13

Open
TheExpertNoob opened this issue Nov 1, 2023 · 1 comment
Open

Rustfoil generates extra characters #13

TheExpertNoob opened this issue Nov 1, 2023 · 1 comment

Comments

@TheExpertNoob
Copy link

TheExpertNoob commented Nov 1, 2023

When running rustfoil with the --compression off flag, it generates the TINFOIL header plus extra characters outside of the main brackets. After manually adding what I need to (themes and retro ROMs sections), I then use the encrypt.py script provided on the tinfoil.io website using the public.key and using its (python's) zstd compression, Tinfoil will not pick it up. Oddly enough, using just the plain text file originally created by rustfoil (and manually adding my extra sections) it works fine with Tinfoil.
Now I can manually remove those extra characters in Notepad++ then compress/encrypt and Tinfoil picks it up just fine.
So what I am getting at, what is writing the TINFOIL header and is it needed, as well as the (Mostly) NUL characters, (I assume padding maybe?) and are they needed.
Bonus feature request: can we also get some line returns so it isn't all one line?

@DevYukine
Copy link
Owner

Hey @TheExpertNoob,

These extra characters you speaking about are part of Tinfoils official spec, when i made Rustfoil (nearly 3 years from now) i meanly oriented myself at what Tingen did at the time (see https://github.com/eXhumer/pyTinGen) which also followed this spec.

Writing the Tinfoil header is needed when enabling compression and or encryption as the spec is just needed when either of those are used (tinfoil needs a certain flag to know what compression is used and if encryption is used) but Rustfoil always writes that header cause there is really no reason to not write it, when i made Rustfoil i had not in mind that some people might want to modify the file afterwards for currently unsupported features such as Themes and retro ROMs.

I personally also do not see much use in a formatted json response.

If you tell me what Tinfoil expects for retro roms and Themes (like what i need to add to the index json) im happy to natively implement it in Rustfoil tho 😃

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

No branches or pull requests

2 participants