Skip to content

base85 z85 variant encoding #75299

Closed
Closed

Description

@underrun
mannequin
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']

    Activity

    1. underrun commented on Aug 3, 2017

      underrunmannequin
      MannequinAuthor

      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?
    2. added
      stdlibStandard Library Python modules in the Lib/ directory
      type-featureA feature request or enhancement
      on Aug 3, 2017
    3. Dobatymo commented on Feb 14, 2020

      Dobatymomannequin
      Mannequin

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

      That's the _b85alphabet

      _b85alphabet = (b"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
                      b"abcdefghijklmnopqrstuvwxyz!#$%&()*+-;<=>?@^_`{|}~")
    4. underrun commented on Feb 15, 2020

      underrunmannequin
      MannequinAuthor

      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\>


    5. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      3.9 (EOL)end of lifestdlibStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancement

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions