GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — C accelerator for Base32 character encoding · Issue #146192 · python/cpython

C accelerator for Base32 character encoding #146192

New issue
Copy link
New issue
Copy link
Closed
#146193
Closed
C accelerator for Base32 character encoding#146192
#146193
Copy link
Labels
extension-modulesC modules in the Modules dirC modules in the Modules dirperformancePerformance or resource usagePerformance or resource usagetype-featureA feature request or enhancementA feature request or enhancement

Description

@kangtastic
kangtastic
opened on Mar 20, 2026
Issue body actions

Proposal:

The base64 module contains implementations of encoders/decoders for several character encodings.

Among these are the base32 and base32hex encodings mentioned in RFC 4648.

These are currently implemented in pure Python. Implementing them in C will greatly improve performance (~100x) and memory usage.

I have written a draft PR that accomplishes this, and will be submitting it shortly.

Has this already been discussed elsewhere?

No response given

Links to previous discussion of this feature:

Suggested by @serhiy-storchaka in #102753.

Linked PRs

  • gh-146192: Add base32 support to binascii #146193

Activity

  1. kangtastic
    added
    type-featureA feature request or enhancementA feature request or enhancement
    on Mar 20, 2026
  2. kangtastic
    added 2 commits that reference this issue on Mar 20, 2026

    pythongh-146192: Add base32 support to binascii

    c41bda0

    pythongh-146192: Add base32 support to binascii

    db96a3f
  3. serhiy-storchaka commented on Mar 20, 2026

    @serhiy-storchaka
    serhiy-storchaka
    on Mar 20, 2026
    Member
    More actions

    The Base 32 codec is the only one which is implemented in pure Python. This not only makes it slower and increases memory consumption (the same issue as was with the Base 85 codec, see #101178), but it makes difficult to add new features, code for which can be shared between other codecs implemented in C. So, rewriting it in C will help with maintenance.

  4. aisk
    added
    performancePerformance or resource usagePerformance or resource usage
    stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directory
    on Mar 20, 2026
  5. StanFromIreland
    added
    extension-modulesC modules in the Modules dirC modules in the Modules dir
    and removed
    stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directory
    on Mar 20, 2026
  6. kangtastic
    added a commit that references this issue on Mar 20, 2026

    pythongh-146192: Add base32 support to binascii

    0a8e4b1
  7. serhiy-storchaka
    added a commit that references this issue on Mar 22, 2026

    gh-146192: Add base32 support to binascii (GH-146193)

    b4e5bc2
  8. serhiy-storchaka
    closed this as completedin #146193on Mar 22, 2026
  9. CuriousLearner
    added a commit that references this issue on Mar 23, 2026

    Merge branch 'main' of github.com:python/cpython into fix-pythongh-13…

    3e05fa3
  10. ljfp
    added a commit that references this issue on Apr 25, 2026

    pythongh-146192: Add base32 support to binascii (pythonGH-146193)

    c084ba3
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

    extension-modulesC modules in the Modules dirC modules in the Modules dirperformancePerformance or resource usagePerformance or resource usagetype-featureA feature request or enhancementA feature request or enhancement

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.