Skip to content

Conversation

@abso1utezer0
Copy link

Replaces the old binary reader/writer with a custom implementation that supports switching between endianess on the fly.

Copy link
Owner

@ousnius ousnius left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution. The tests seem to be passing.

Do you think you can add a new test for reading and writing a big endian file? Please don't include proprietary assets/meshes, though.

}
}
}
} No newline at end of file
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove unnecessary file edit.

buffer[1] = buffer[6];
buffer[2] = buffer[5];
buffer[3] = buffer[4];
buffer[4] = buffer[3];
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't work for reversing values. Either use buffer.AsSpan(0, 8).Reverse(); or Array.Reverse or use temporary variables.

return 1;
}

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove unnecessary file edit NifFile.cs.

using NiflySharp.Stream;
using System;
using System.Collections.Generic;
using System.Diagnostics;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove using.

@abso1utezer0 abso1utezer0 changed the title Add Endianess Support Big Endian Support + NiDataStream Fixes Jan 13, 2026
@abso1utezer0 abso1utezer0 marked this pull request as draft January 13, 2026 18:59
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.

2 participants