-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
API Proposal: Add BigEndian APIs to BinaryWriter and BinaryReader #77736
Comments
Tagging subscribers to this area: @dotnet/area-system-io Issue DetailsIt is recommended that BinaryWriter and BinaryReader add support for large terminal read/write methods
|
@Bunnui, is this an API request? Can you provide more details? I don't understand what this issue is. |
Because of the platform, when communicating with the Java backend, C # does not provide a way to read and write to the big end in Stream and Binary encapsulation. Although I can convert Byte endian by inverting arrays, I see that BinaryPrimitives has methods for big endians. In BinaryWriter and BinaryReader, only the LittleEndian read-write method is provided, and there is no BigEndian processing method. I discard this class to implement the case to case conversion of stream read-write. proposal |
Because my English is not good, it is translated by machine, so maybe the words look strange, please forgive me! |
Something like this, if the server is using Little Endian, BinaryReader, BinaryWriter is convenient, if the server is using big endian they become a nuisance. The ReadString method also passes in the ReadByteLength,Encoding argument instead of the initial Encoding in the constructor, because it is possible to receive a different encoding |
@Bunnui I think this can be closed as duplicate of #26904. |
It is recommended that BinaryWriter and BinaryReader add support for large terminal read/write methods
The text was updated successfully, but these errors were encountered: