Skip to content

stream: Implement TextStreamFormat#249

Open
german77 wants to merge 3 commits intoopen-ead:masterfrom
german77:stringFormat
Open

stream: Implement TextStreamFormat#249
german77 wants to merge 3 commits intoopen-ead:masterfrom
german77:stringFormat

Conversation

@german77
Copy link
Contributor

@german77 german77 commented Feb 25, 2026

This is a continuation of the previous PR #237. This implements the string format side of yaml files.

This code has a couple of mismatches.
TextStreamFormat::readBit. This function parses the "0b110011" string by chopping off the "0b" part and parsing each char as 0 or 1. However I couldn't make the compiler follow the same flow. https://decomp.me/scratch/PKNGF Fixed uses iterators

TextStreamFormat::writeMemBlock This function converts the data into a base64 string. I suspect the length calculation is not properly done.https://decomp.me/scratch/Xzhbw

TextStreamFormat::getNextData_ This function actually reads the text file and selects the next field of data. The file supports multiple types of comments "", # and /* */. This has a lot of string related inlines in it, this made the logic very complex, I struggled getting even a meaningful level of match 0-40% after finally understanding the logic and several rewrites the match improved to 93% https://decomp.me/scratch/6wcQg


This change is Reviewable

@german77 german77 force-pushed the stringFormat branch 3 times, most recently from 78aace5 to fd65f71 Compare February 25, 2026 23:15
@german77 german77 changed the title stream: Implement TextStreamFormat stream: Implement TextStreamFormat Feb 26, 2026
@german77
Copy link
Contributor Author

german77 commented Mar 17, 2026

Something important to note. While fixing TextStreamFormat::readBit I found that the end iterator includes the string terminator. I didn't notice any negative effects from this change so I'm probably the first one to use it.

TextStreamFormat::writeMemBlock apparently matches on botw I was confusing the BinaryStreamFormat

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