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

base85 z85 variant encoding #75299

Closed
underrun mannequin opened this issue Aug 3, 2017 · 3 comments
Closed

base85 z85 variant encoding #75299

underrun mannequin opened this issue Aug 3, 2017 · 3 comments
Labels
3.9 only security fixes stdlib Python modules in the Lib dir type-feature A feature request or enhancement

Comments

@underrun
Copy link
Mannequin

underrun mannequin commented Aug 3, 2017

BPO 31116
Nosy @pitrou, @Dobatymo, @matan1008
PRs
  • bpo-31116: Add Z85 variant to base64 #30598
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = None
    created_at = <Date 2017-08-03.22:32:22.945>
    labels = ['type-feature', 'library', '3.9']
    title = 'base85 z85 variant encoding'
    updated_at = <Date 2022-01-14.10:46:27.835>
    user = 'https://bugs.python.org/underrun'

    bugs.python.org fields:

    activity = <Date 2022-01-14.10:46:27.835>
    actor = 'matan1008'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = ['Library (Lib)']
    creation = <Date 2017-08-03.22:32:22.945>
    creator = 'underrun'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 31116
    keywords = ['patch']
    message_count = 3.0
    messages = ['299724', '361991', '362026']
    nosy_count = 4.0
    nosy_names = ['pitrou', 'underrun', 'Dobatymo', 'matan1008']
    pr_nums = ['30598']
    priority = 'normal'
    resolution = None
    stage = 'patch review'
    status = 'open'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue31116'
    versions = ['Python 3.9']

    @underrun
    Copy link
    Mannequin Author

    underrun mannequin commented Aug 3, 2017

    Issue bpo-17618 introduced base85 options into the base64 module including b85 and a85/adobe variants.

    There has since been introduced a variant that is easier to work with specifically as it avoids " ' \ characters which avoids quoting/escaping issues when working with base85 literals in python, json, xml, etc.

    https://rfc.zeromq.org/spec:32/Z85/

    there is a reference implementation in c for which an extension could easily be built.

    alternately it would be very easy to add a _z85alphabet etc. to the base64 module to mirror what has been done with a/b85.

    1. is there any interest in this being in the language
    2. if so do we want python impl or c extension around ref impl?

    @underrun underrun mannequin added 3.7 (EOL) end of life stdlib Python modules in the Lib dir type-feature A feature request or enhancement labels Aug 3, 2017
    @Dobatymo
    Copy link
    Mannequin

    Dobatymo mannequin commented Feb 14, 2020

    base64.b85encode does not use ", ' or \ as well.

    That's the _b85alphabet

    _b85alphabet = (b"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
                    b"abcdefghijklmnopqrstuvwxyz!#$%&()*+-;<=>?@^_`{|}~")

    @underrun
    Copy link
    Mannequin Author

    underrun mannequin commented Feb 15, 2020

    z85 avoids all of:

    ` \ " ' _ , ;

    Backtick and semicolon increase the number of places that z85 can be used
    without issue over b85. All of these might not be as big an issue in python
    as in other tools/languages but interoperability would still be improved
    through the addition of z85.

    • Derek

    On Fri, Feb 14, 2020, 09:18 Dobatymo <report@bugs.python.org> wrote:

    Dobatymo <the-real-hazzard@outlook.com> added the comment:

    base64.b85encode does not use ", ' or \ as well.

    That's the _b85alphabet

    _b85alphabet = (b"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
    b"abcdefghijklmnopqrstuvwxyz!#$%&()*+-;<=>?@^_`{|}~")

    ----------
    nosy: +Dobatymo


    Python tracker <report@bugs.python.org>
    <https://bugs.python.org/issue31116\>


    @SilentGhost SilentGhost mannequin added 3.9 only security fixes and removed 3.7 (EOL) end of life labels Feb 15, 2020
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.9 only security fixes stdlib Python modules in the Lib dir type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant