rust-osdev / ucs2-rs

UCS-2 conversion utilities for Rust.
Mozilla Public License 2.0
6 stars 5 forks source link

Describe the maximum size of the decoded buffer #10

Closed GabrielMajeri closed 2 years ago

GabrielMajeri commented 3 years ago

To help with issues like #9, this PR updates the decode/decode_with documentation to specify that the output buffer should be at least three times as big as the number of characters in the input, since each 2-byte UCS-2 character could end up as a 3-byte UTF-8 character.