Skip to content

feat: add public cp1252 decode_string/encode_string helpers - #7

Merged
tyler27 merged 1 commit into
RustCityRS:mainfrom
tyler27:feat/public-cp1252
May 24, 2026
Merged

tyler27 merged 1 commit into
RustCityRS:mainfrom
tyler27:feat/public-cp1252

Conversation

@tyler27

@tyler27 tyler27 commented May 24, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds cp1252::decode_string(&[u8]) -> String — converts CP-1252 bytes to UTF-8
  • Adds cp1252::encode_string(&str) -> Vec<u8> — converts UTF-8 string to CP-1252 bytes

These wrap the existing internal decode/encode functions, following the same pattern as bz2_compress/bz2_decompress and gz_compress/gz_decompress.

Needed for cases where CP-1252 data arrives outside of Packet (e.g. Huffman-decoded chat messages).

No breaking changes — purely additive.

@tyler27
tyler27 force-pushed the feat/public-cp1252 branch from 6cf2a1a to f96e31e Compare May 24, 2026 22:43
@tyler27
tyler27 merged commit 645c39a into RustCityRS:main May 24, 2026
3 of 4 checks passed
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