Skip to content
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

support decoding byte slices #387

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

support decoding byte slices #387

wants to merge 2 commits into from

Commits on Apr 21, 2024

  1. support decoding byte slices

    All of the backend infrastructure was in place to support &[u8],
    and some functions already take `impl AsRef<[u8]>`. However the
    main decode() and decode_header() functions require a &str. This
    change updates a few internal signatures and adds a _bytes()
    version of decode and decode_header.
    
    When you're doing many requests per second, the cost of doing
    an extra utf-8 check over header payloads is significant. By
    supporting a &[u8] decode, users can let base64 and the crypto
    implementation in question handle its own bytewise validity. They
    already do this today in addition to the extra utf-8 scan.
    kvc0 committed Apr 21, 2024
    Configuration menu
    Copy the full SHA
    e340d75 View commit details
    Browse the repository at this point in the history

Commits on Apr 24, 2024

  1. Configuration menu
    Copy the full SHA
    abf4e7e View commit details
    Browse the repository at this point in the history