All encoding/decoding functions use native APIs when available, with pure JS fallback for environments that don't support them yet.