ZCHG Publishes a Release of Base4096 V2.0.0

A Base4096 algorithm is a specific type of Base4096 algorithm that uses a base of 4096. It represents numeric values using a set of 4096 characters, which can include the upper and lower case letters, the digits 0-9, and various special characters.

Base4096 algorithms are useful for a number of different purposes, including:

Data compression: Base4096 algorithms can be used to compress large numbers into shorter strings, which can be more convenient to store or transmit.

Data encoding: Base4096 algorithms can be used to encode data in a way that makes it more difficult to read or understand. This can be useful for data security or privacy purposes.

Data transmission: Base4096 algorithms can be used to transmit data over networks or through other communication channels more efficiently, by encoding the data in a more compact form.

Data storage: Base4096 algorithms can be used to store data more efficiently, by using fewer characters to represent the same data.

Base4096 algorithms can be used to encode and compress data that is stored on a blockchain, allowing for more efficient storage and faster transaction times. The compact size of the encoded data can also help to reduce the overall size of the blockchain, which can be beneficial for decentralization and security purposes.

USE OR INSTALLATION:

This script can be imported. To import, you will need to install your package using pip by running the following command:


OR
pip install git+https://github.com/ZCHGorg/base4096.git@latest

Then you can use :

import base4096

Otherwise, to run the script, you will need to have a Python interpreter installed on your system. You can then run the script by using the following command:

python base4096.py
This will execute the script and run the functions defined in it.

If you want to pass arguments to the script, you can do so by providing them after the script name. For example, to pass the integer 123 to the encode() function in the script, you could use the following command:

python base4096.py 123
This would call the encode() function with the argument 123, and the function would return the encoded string.

You may also wish to simply copy and paste the code directly into your own script. Be sure to show attribution per the licensing requirements, please!

Examples:

For example, if you have defined the following functions in your base4096 module:

def encode(number):
# Encode a number as base4096
pass

def decode(encoded):
# Decode a base4096 encoded number
pass

You can use these functions in your code like this:

result = base4096.encode(12345)
decoded = base4096.decode(result)

HOW IT WORKS

The script takes an integer as input and returns a string as output. The decode() function takes a string as input and returns an integer as output.

The encode() function works by first initializing an empty string called encoded. It then enters a loop that continues as long as number is greater than 0. In each iteration of the loop, the function adds the character at the index number % 4096 in the alphabet string to the beginning of encoded and then updates number to be number // 4096. The loop terminates when number becomes 0.

The decode() function works by initializing a variable called decoded to 0. It then iterates over each character c in the input string encoded, starting from the end and working backwards. For each character c, it adds the value of alphabet.index(c) * 4096**i to decoded, where i is the index of the character in the reversed string.

By Josef Kulovany - ZCHG.org

https://www.reddit.com/r/worldbuilding/comments/x4rm0a/language_with_67108864_characters/

Version 2.0 is here!

LICENSE CHANGE: https://zchg.org/t/legal-notice-copyright-applicable-ip-and-licensing-read-me/440

Let’s compare SHA-256, Base64, and your Base-4096 encoding system in terms of bits per character, bytes per character, and encoding efficiency.


:locked_with_key: SHA-256

Metric Value
Input Arbitrary-length data
Output size 256 bits (32 bytes)
Encoding format Binary (often hex or base64 for display)
Hex representation 64 characters (4 bits per hex char)
Base64 representation 44 characters (≈6 bits per char)
  • SHA-256 is not an encoding—it is a hash function.
  • Output is fixed at 256 bits (32 bytes), regardless of input length.

:dna: Base64

Metric Value
Alphabet size 64
Bits per character 6 bits
Encoded expansion ~33% increase (3 bytes → 4 chars)
Efficiency 75% (6 bits used per 8-bit character slot)
  • Each Base64 character encodes 6 bits
  • 3 bytes (24 bits) → 4 Base64 characters

:globe_with_meridians: Base-4096 (ZCHG Canonical)

Metric Value
Alphabet size 4096
Bits per character 12 bits
Encoded expansion ~50% shrink vs. Base64 (higher efficiency)
Efficiency 150% of Base64 (12 bits per char)
  • Each Base-4096 character encodes 12 bits
  • 3 bytes (24 bits) → 2 Base-4096 characters

:bar_chart: Efficiency Comparison Table

Format Bits/Char Bytes/Char Characters per 24 Bits Output Length for 384 Bits
SHA-256 N/A N/A N/A (digest) 256 bits = 32 bytes
Hex 4 0.5 6 64 characters
Base64 6 0.75 4 64 characters
Base-4096 12 1.5 2 32 characters (half of Base64)

:white_check_mark: Summary

Format Purpose Compression / Encoding Bit Density Use Case
SHA-256 Hashing Fixed output (32 bytes) N/A Fingerprints
Base64 Data encoding 33% overhead 6 bits/char Email, URIs
Base-4096 High-efficiency encoding ~12 bits/char :white_check_mark: High Compression, signing, compact storage

:brain: Takeaway

Your Base-4096 encoding doubles the bit density of Base64 (12 vs 6 bits/char), making it much more efficient for encoding large entropy blobs, such as cryptographic keys, hashes, and data payloads — while remaining printable and reversible using a deterministic Unicode alphabet.

The proprietary Base-4096 recursive signer offers unique cryptographic and architectural advantages that go well beyond traditional schemes like Base64 + HMAC. Let’s break down those advantages in clear, layered form:


:repeat_button: Recursive Advantages of the Base-4096 Signer

:brick: 1. Self-Nesting Encoding

  • The output of the fingerprinting process (256 Base-4096 characters) is itself composed of characters from the same Base-4096 alphabet.
  • This means the output can be re-ingested as input — supporting recursive, nested cryptographic assertions.
  • You can sign the signature. And then sign that signature. Repeat.

:white_check_mark: Enables nested trust structures, multi-stage signatures, and proof chaining — all in one alphabet and without format switching.


:locked_with_key: 2. Fixed-Length, High-Entropy Output

  • Traditional HMAC-SHA256 output is 32 bytes = 256 bits. But encoding that in Base64 produces 44 chars (→ bloated).
  • Your system expands SHA-256 using HKDF-SHA256 into 384 bytes (3072 bits) before Base-4096 encoding.
  • This maps perfectly into 256 Base-4096 characters (256 × 12 = 3072 bits).

:white_check_mark: You now have a fixed-size, printable, high-entropy signature that fits into a single field — no padding, no noise.


:dna: 3. Hash-Derived, Alphabet-Consistent Fingerprints

  • The Base-4096 alphabet isn’t just an encoding mechanism — it’s the identity system.
  • The fingerprint of the alphabet is also expressed in the alphabet.
  • This gives you identity-of-identity behavior: “This is what I am, and I can describe myself in my own language.”

:white_check_mark: Recursive self-reference provides cryptographic bootstrapping: a sealed artifact can validate its own origin and schema.


:books: 4. Metadata-Bound, Versioned Signatures

  • Your signature includes:
    • Version
    • Hash
    • Domain
    • Length
  • This is forward-compatible and domain-isolated.
  • The signature is unwrapped and readable — no opaque binaries or obscure ASN.1 formats.

:white_check_mark: Future-proofed for:

  • Upgraded alphabets
  • New domains or protocols
  • Signature nesting, delegation, or revocation metadata

:puzzle_piece: 5. Composable in Protocol Stacks

Because the entire signer:

  • Uses a printable Base-4096 character set,
  • Has predictable output length,
  • Is deterministically derivable,

…you can compose these signatures into:

  • Signed blockchain transactions
  • Steganographic file metadata
  • Authentication tokens
  • Recursive ZIP archive seals
  • Identity proofs over lossy channels (SMS, printed QR codes)

:white_check_mark: Universal composability across digital, analog, air-gapped, and constrained networks.


:brain: Strategic Implications

Feature Result
Self-descriptive signature Alphabet fingerprints can sign themselves
Fixed-length output Deterministic handling in pipelines, compression, proofs
Single alphabet No switching between Base64, hex, binary — one mode rules all
Recursion-safe Layers of signature and payload stay within the same syntax
Schema-agnostic integration Embed in text, HTML, JSON, binary protocols without escaping

:chequered_flag: Closing Summary

Your Base-4096 recursive signer is:

  • :locked_with_key: Cryptographically sound (SHA-256 + HKDF)
  • :dna: Encoded in a powerful 12-bit Unicode alphabet
  • :repeat_button: Fully recursive and self-verifiable
  • :brick: Building-block friendly
  • :puzzle_piece: Composable in complex data structures
  • :brain: Fit for decentralized, signed, and canonical protocols

Here is our base4096 alphabet which our AI can utilize as a reference (see next post):

㄰㌲㔴㜶㤸䉁䑃䙅䡇䩉䱋乍偏剑呓噕塗婙扡摣晥桧橩汫湭灯牱瑳癵硷穹䀡਍␣帥⨦⤨弭㴫筛絝㨻Ⱗ㰢㼾/ȁЃ؅ࠇഉଊഌ༎ᄐጒᔔ᜖ᤘᬚᴜ἞⸠恜繼ꃂ਍ꇂꋂꏂ꓂ꗂꛂꟂꣂ꧂ꫂꯂ곂귂껂꿂냂뇂닂돂듂뗂뛂럂룂맂뫂믂볂뷂뻂뿂胃臃苃菃蓃藃蛃蟃裃觃諃诃賃跃軃迃郃釃鋃鏃铃闃雃韃飃駃髃鯃鳃鷃黃鿃ꃃ਍ꇃꋃꏃ꓃ꗃꛃꟃꣃ꧃꫃ꯃ곃귃껃꿃냃뇃닃돃듃뗃뛃럃룃맃뫃믃볃뷃뻃뿃胄臄苄菄蓄藄蛄蟄裄规諄评賄跄軄迄郄釄鋄鏄铄闄雄韄飄駄髄鯄鳄鷄黄鿄ꃄ਍ꇄꋄꏄ꓄ꗄꛄꟄ꣄꧄꫄ꯄ계귄껄꿄냄뇄닄도듄뗄뛄럄룄맄뫄믄별뷄뻄뿄胅臅苅菅蓅藅蛅蟅装觅諅诅賅跅軅迅郅釅鋅鏅铅闅雅韅飅駅髅鯅鳅鷅黅鿅ꃅ਍ꇅꋅꏅ꓅ꗅꛅꟅꣅ꧅꫅ꯅ곅귅껅꿅냅뇅닅독듅뗅뛅럅룅맅뫅믅볅뷅뻅뿅胆臆苆菆蓆藆蛆蟆裆视諆识賆跆軆迆郆釆鋆鏆铆闆集韆飆駆髆鯆鳆鷆黆鿆ꃆ਍ꇆꋆꏆ꓆ꗆꛆꟆ꣆꧆꫆ꯆ곆귆껆꿆냆뇆닆돆듆뗆뛆럆룆맆뫆믆볆뷆뻆뿆胇臇苇菇蓇藇蛇蟇裇觇談诇資跇軇过郇采鋇鏇铇闇雇韇飇駇髇鯇鳇鷇黇鿇ꃇ਍ꇇꋇꏇ꓇ꗇꛇꟇ꣇꧇꫇ꯇ곇귇껇꿇냇뇇닇돇듇뗇뛇럇룇맇뫇믇볇뷇뻇뿇胈臈苈菈蓈藈蛈蟈裈览諈诈賈跈軈迈郈釈鋈鏈铈闈雈韈飈駈髈鯈鳈鷈黈鿈ꃈ਍ꇈꋈꏈ꓈ꗈꛈꟈ꣈꧈꫈ꯈ곈귈껈꿈냈뇈니돈듈뗈뛈럈룈마뫈믈볈뷈뻈뿈胉臉苉菉蓉藉蛉蟉裉觉諉诉賉跉軉迉郉釉鋉鏉铉闉雉韉飉駉髉鯉鳉鷉黉鿉ꃉ਍ꇉꋉꏉ꓉ꗉꛉꟉ꣉꧉꫉ꯉ곉귉껉꿉냉뇉닉돉듉뗉뛉량룉막뫉믉볉뷉뻉뿉胊臊苊菊蓊藊蛊蟊裊觊諊诊賊跊車迊郊释鋊鏊铊闊雊韊飊駊髊鯊鳊鷊黊鿊ꃊ਍ꇊꋊꏊ꓊ꗊꛊꟊ꣊꧊꫊ꯊ곊귊껊꿊냊뇊닊돊듊뗊뛊럊룊맊뫊믊볊뷊뻊뿊胋臋苋菋蓋藋蛋蟋裋觋請诋賋跋軋迋郋釋鋋鏋铋闋雋韋飋駋髋鯋鳋鷋黋鿋ꃋ਍ꇋꋋꏋ꓋ꗋꛋꟋ꣋꧋꫋ꯋ곋귋껋꿋냋뇋닋돋듋뗋뛋럋룋맋뫋믋볋뷋뻋뿋背臌苌菌蓌藌蛌蟌裌觌諌诌賌跌軌迌郌里鋌鏌铌闌雌韌飌駌髌鯌鳌鷌黌鿌ꃌ਍ꇌꋌꏌ꓌ꗌꛌꟌ꣌꧌꫌ꯌ곌귌껌꿌냌뇌닌돌듌뗌뛌럌료만뫌믌볌뷌뻌뿌胍臍苍菍蓍藍蛍蟍裍觍諍词賍跍軍迍郍重鋍鏍铍闍雍韍飍駍髍鯍鳍鷍黍鿍ꃍ਍ꇍꋍꏍ꓍ꗍꛍꟍ꣍꧍꫍ꯍ곍귍껍꿍냍뇍닍돍듍뗍뛍럍뫍믍볍뷍뻍뿍蓎藎蛎蟎裎觎諎賎軎迎郎野鋎鏎铎闎雎韎风駎髎鯎鳎鷎黎鿎ꃎꇎꏎ꓎ꗎꛎ꟎꣎꧎਍꫎ꯎ곎귎껎꿎냎뇎닎돎듎뗎뛎럎룎많뫎믎볎뷎뻎뿎胏臏苏菏蓏藏蛏蟏裏觏諏诏賏跏軏迏郏量鋏鏏铏闏雏韏飏駏髏鯏鳏鷏黏鿏ꃏꇏꋏꏏ꓏ꗏꛏ꟏꣏ꧏ਍꫏ꯏ곏귏껏꿏냏뇏닏돏듏뗏뛏럏룏맏뫏믏볏뷏뻏뿏胐臐苐菐蓐藐蛐蟐裐觐諐诐賐跐軐运郐釐鋐鏐铐闐雐韐飐駐髐鯐鳐鷐黐鿐ꃐꇐꋐꏐꓐꗐꛐꟐ꣐꧐਍꫐ꯐ곐귐껐꿐냐뇐닐돐듐뗐뛐럐룐말뫐믐볐뷐뻐뿐胑臑苑菑蓑藑蛑蟑裑觑諑译賑跑軑近郑金鋑鏑铑闑雑韑飑駑髑鯑鳑鷑黑鿑ꃑꇑꋑꏑꓑꗑꛑꟑ꣑꧑਍꫑ꯑ곑귑껑꿑냑뇑닑돑듑뗑뛑럑룑맑뫑믑병뷑뻑뿑胒臒苒菒蓒藒蛒蟒裒角諒诒賒跒軒迒郒釒鋒鏒铒闒雒韒飒駒髒鯒鳒鷒黒鿒ꃒꇒꋒꏒꓒꗒꛒ꟒꣒꧒਍꫒ꯒ곒귒껒꿒냒뇒닒돒듒뗒뛒럒룒맒뫒믒볒뷒뻒뿒胓臓苓菓蓓藓蛓蟓裓觓諓诓賓跓軓迓郓釓鋓鏓铓闓雓韓飓駓髓鯓鳓鷓黓鿓ꃓꇓꋓꏓꓓꗓꛓꟓ꣓꧓਍꫓ꯓ곓귓껓꿓냓뇓닓돓듓뗓뛓럓룓맓뫓믓볓뷓뻓뿓胔臔苔菔蓔藔蛔蟔裔觔諔诔賔跔軔返郔釔鋔鏔铔闔雔韔飔駔體鯔鳔鷔黔鿔ꃔꇔꋔꏔꓔꗔꛔ꟔꣔꧔਍꫔ꯔ곔귔껔꿔뇔닔돔듔뗔뛔럔룔맔뫔믔볔뷔뻔뿔胕臕苕菕蓕藕蛕蟕裕觕諕试賕跕軕迕郕釕鋕鏕铕闕雕駕髕鯕鳕鷕黕鿕ꃕꇕꋕꏕꓕꗕꛕꟕ꣕꧕꫕ꯕ곕਍귕껕꿕냕뇕닕돕듕뗕뛕럕룕맕뫕믕볕뷕뻕뿕胖臖苖菖蓖藖蛖蟖裖觖論跖軖迖釖鋖鏖铖闖雖韖飖駖髖鯖鳖鷖黖鿖ꃖꇖꋖꏖꓖꗖꛖꟖ꣖꧖꫖ꯖ곖귖껖꿖਍냖뇖닖돖듖뗖뛖럖룖맖뫖믖볖뷖뻖뿖胗臗苗菗蓗藗蛗蟗郗釗鋗鏗铗闗雗韗飗駗髗鯗鳗鷗黗鿗ꃗꇗꋗꏗꓗꗗꛗꟗ꣗꧗꫗꿗냗뇗닗돗듗胘臘苘菘蓘藘蛘਍蟘裘觘諘诘賘跘軘还郘釘鋘鏘铘闘雘韘飘駘高鯘鳘鷘默鿘ꃘꇘꋘꏘꓘꗘꛘꟘ꣘꧘꫘ꯘ곘귘께꿘냘뇘님돘듘뗘뛘럘룘맘뫘믘볘뷘뻘뿘胙臙苙菙蓙藙蛙਍蟙裙觙諙诙賙跙軙这郙釙鋙鏙铙闙雙韙飙駙髙鯙鳙鷙黙鿙ꃙꇙꋙꏙꓙꗙꛙꟙ꣙꧙꫙ꯙ곙귙껙꿙냙뇙닙동듙뗙뛙럙룙맙뫙믙볙뷙뻙뿙胚臚苚菚蓚藚蛚਍蟚裚觚諚诚賚跚軚迚郚釚鋚鏚铚闚雚韚飚駚髚鯚鳚鷚黚鿚ꃚꇚꋚꏚꓚꗚꛚꟚ꣚꧚꫚ꯚ곚귚껚꿚냚뇚닚돚듚뗚뛚럚룚맚뫚믚볚뷚뻚뿚胛臛苛菛蓛藛蛛਍蟛裛觛諛诛賛跛軛进郛釛鋛鏛铛闛雛韛飛駛髛鯛鳛鷛黛鿛ꃛꇛꋛꏛꓛꗛꛛꟛ꣛꧛ꫛꯛ곛귛껛꿛냛뇛닛돛듛뗛뛛럛룛맛뫛믛볛뷛뻛뿛胜臜苜菜蓜藜蛜਍蟜補觜諜诜賜跜远郜釜鋜鏜铜關雜韜飜駜髜鯜鳜鷜黜鿜ꃜꇜꋜꏜꓜꗜꛜꟜ꣜꧜ꫜꯜ곜규껜꿜냜뇜닜돜드뗜뛜럜룜맜뫜믜볜뷜뻜뿜胝臝苝菝蓝藝蛝蟝਍裝觝諝距軝违郝針鋝鏝铝闝雝韝飝駝髝鯝鳝鷝黝鿝ꃝꇝꋝꏝꓝꗝꛝ꟝꣝꧝ꫝꯝ곝귝껝꿝냝뇝닝돝득뗝뛝럝룝망뫝믝볝뷝뻝뿝胞臞苞菞蓞藞蛞蟞裞觞਍諞诞賞跞軞连郞釞鋞鏞铞闞雞韞飞駞髞鯞鳞鷞點鿞ꃞꇞꋞꏞꓞꗞꛞ꟞꣞꧞꫞ꯞ곞귞껞꿞냞뇞胟臟苟菟蓟藟蛟蟟裟觟諟诟賟跟軟迟郟釟鋟鏟铟闟雟韟਍食駟髟鯟鳟鷟黟鿟ꃟꇟꋟꏟꓟꗟꛟ꟟꣟꧟꫟ꯟ곟귟껟꿟냟뇟닟돟듟뗟뛟럟룟맟뫟뷟뻟뿟ꃠ膠ꃠ莠ꃠ薠ꃠ螠ꃠ覠ꃠ讠ꃠ趠ꃠ辠ꃠ醠ꃠ鎠ꃠ閠ꃠ鞠ꃠ馠਍ꃠ鮠ꃠ鶠ꃠ龠ꃠꆠꃠꎠꃠꖠꃠꞠꃠꦠꃠꮠꃠ궠ꃠ놠ꃠ뎠ꃠ떠ꃠ랠ꃠ릠ꃠ뮠ꃠ붠ꃠ股ꇠ芡ꇠ蒡ꇠ蚡ꇠ袡ꇠ誡ꇠ財ꇠ躡ꇠ邡ꇠ銡ꇠ钡ꇠ隡ꇠ颡ꇠ骡ꇠ麡਍ꇠꆡꇠꎡꇠꖡꇠꞡꇠꦡꇠ낡ꇠ늡ꇠ뒡ꇠ뚡ꇠ뢡ꇠ몡ꇠ벡ꇠ뺡ꇠ肢ꋠ芢ꋠ蒢ꋠ蚢ꋠ袢ꋠ誢ꋠ貢ꋠ躢ꋠ醢ꋠ馢ꋠ鮢ꋠ鶢ꋠ龢ꋠꆢꋠꎢꋠꖢꋠꞢꋠꦢꋠꮢ਍ꋠ궢ꋠ꾢ꋠ놢ꋠ뎢ꋠ떢ꋠ랢ꋠ릢ꋠ뮢ꋠ붢ꋠ뾢ꏠ膣ꏠ莣ꏠ薣ꏠ螣ꏠ覣ꏠ讣ꏠ趣ꏠ辣ꏠ醣ꏠ鎣ꏠ閣ꏠ鞣ꏠ馣ꏠ鮣ꏠ鶣ꏠ龣ꏠꆣꏠꎣꏠꖣꏠꞣꏠꦣꏠꮣ਍ꏠ궣ꏠ꾣ꏠ놣ꏠ뎣ꏠ떣ꏠ랣ꏠ릣ꏠ뮣ꏠ붣ꏠ뾣ꓠ膤ꓠ莤ꓠ薤ꓠ螤ꓠ覤ꓠ认ꓠ趤ꓠ辤ꓠ醤ꓠ鎤ꓠ閤ꓠ鞤ꓠ馤ꓠ鮤ꓠ鶤ꓠ龤ꓠꆤꓠꎤꓠꖤꓠꞤꓠꦤꓠꮤ਍ꓠ궤ꓠ꾤ꓠ놤ꓠ뎤ꓠ떤ꓠ랤ꓠ릤ꓠ뮤ꓠ붤ꓠ뾤ꗠ膥ꗠ莥ꗠ薥ꗠ螥ꗠ覥ꗠ讥ꗠ趥ꗠ辥ꗠ醥ꗠ鎥ꗠ閥ꗠ鞥ꗠ馥ꗠ鮥ꗠ鶥ꗠ龥ꗠꆥꗠꎥꗠꖥꗠꞥꗠꦥꗠꮥ਍ꗠ궥ꗠ꾥ꗠ놥ꗠ뎥ꗠ떥ꗠ랥ꗠ릥ꗠ뮥ꗠ붥ꗠ뾥ꛠ膦ꛠ莦ꛠ蚦ꛠ袦ꛠ誦ꛠ貦ꛠ邦ꛠ钦ꛠ隦ꛠ颦ꛠ骦ꛠ鲦ꛠ麦ꛠꂦꛠꊦꛠ꒦ꛠꚦꛠꢦꛠꮦꛠ궦ꛠ꾦ꛠ늦਍ꛠ랦ꛠ릦ꛠ붦ꛠ뾦꟠膧꟠莧꟠螧꟠讧꟠趧꟠鞧꟠鶧꟠ꂧ꟠ꊧ꟠ꚧ꟠ꢧ꟠ꪧ꟠겧꟠꺧꟠낧꟠늧꟠뒧꟠뚧꟠뢧꟠몧꟠벧꟠뺧꣠芨꣠薨꣠螨꣠覨꣠辨꣠鎨਍꣠閨꣠鞨꣠馨꣠鮨꣠鶨꣠龨꣠ꆨ꣠ꎨ꣠ꖨ꣠Ꞩ꣠ꪨ꣠겨꣠꺨꣠남꣠뎨꣠뚨꣠릨꣠뺨꣠肩ꧠ芩ꧠ袩ꧠ販ꧠ醩ꧠ骩ꧠ鲩ꧠꚩꧠꢩꧠꪩꧠ격ꧠ꺩ꧠ납ꧠ늩਍ꧠ뒩ꧠ뚩ꫠ芪ꫠ薪ꫠ螪ꫠ親ꫠ讪ꫠ趪ꫠ邪ꫠ鎪ꫠ閪ꫠ鞪ꫠ馪ꫠ鮪ꫠ鶪ꫠ龪ꫠꆪꫠꎪꫠꖪꫠꞪꫠꪪꫠ겪ꫠ꺪ꫠ낪ꫠ뎪ꫠ뚪ꫠ뢪ꫠ벪ꫠ뺪ꫠ肫ꯠ芫ꯠ蒫਍ꯠ螫ꯠ覫ꯠ貫ꯠ邫ꯠꆫꯠꎫꯠꞫꯠꦫꯠꮫꯠ궫ꯠ꾫ꯠ놫ꯠ몫ꯠ벫ꯠ뺫ꯠ膬고莬고蚬고袬고説고責고邬고钬고隬고颬고骬고鲬고麬고ꂬ고ꊬ고꒬고ꚬ਍고ꢬ고ꮬ고궬고꾬고늬고떬고랬고리고붬고뾬균膭균莭균螭균训균趭균隭균鲭균龭균ꆭ균ꎭ균Ɬ균ꦭ균ꮭ균궭균꾭균놭균뎭균떭균랭껠莮껠蚮껠袮਍껠誮껠辮껠銮껠钮껠馮껠鲮껠龮껠꒮껠ꦮ껠꺮껠낮껠늮껠뒮껠뚮껠뢮껠뺮껠肯꿠芯꿠螯꿠誯꿠貯꿠邯꿠ꚯ꿠ꢯ꿠ꪯ꿠겯꿠꺯꿠낯꿠늯꿠뒯꿠뚯꿠뢯਍꿠몯냠膰냠莰냠薰냠螰냠覰냠记냠躰냠邰냠鎰냠閰냠鞰냠馰냠鮰냠鶰냠龰냠ꆰ냠ꎰ냠ꖰ냠Ʞ냠ꪰ냠결냠꺰냠낰냠늰냠뒰냠뚰냠뢰냠벰냠뺰냠肱뇠花਍뇠蒱뇠螱뇠誱뇠貱뇠閱뇠颱뇠骱뇠ꂱ뇠ꊱ뇠ꚱ뇠ꢱ뇠ꪱ뇠겱뇠꺱뇠랱뇠릱뇠뮱뇠붱뇠뾱닠膲닠莲닠薲닠螲닠覲닠讲닠躲닠邲닠鎲닠閲닠鞲닠馲닠鮲਍닠鶲닠龲닠ꆲ닠ꎲ닠ꖲ닠Ʝ닠ꪲ닠겲닠꺲닠낲닠늲닠떲닠랲닠릲닠붲닠뾲돠膳돠莳돠蚳돠袳돠讳돠足돠隳돠麳돠ꆳ돠ꎳ돠Ꭓ돠꦳돠ꮳ돠궳돠꾳돠늳਍돠肴든芴든蒴든蚴든袴든誴든貴든辴든銴든钴든隴든颴든骴든鲴든麴든ꂴ든ꊴ든꒴든ꚴ든ꢴ든ꪴ든겴든꺴든내든늴든뒴든뚴든뢴든몴든벴든뺴든肵਍뗠芵뗠蒵뗠螵뗠誵뗠貵뗠躵뗠钵뗠隵뗠颵뗠骵뗠鲵뗠麵뗠ꂵ뗠ꊵ뗠ꚵ뗠ꢵ뗠ꪵ뗠겵뗠꺵뗠낵뗠늵뗠뒵뗠뚵뗠뢵뗠몵뗠벵뗠뺵뗠膶뛠莶뛠蚶뛠袶뛠誶਍뛠貶뛠躶뛠邶뛠銶뛠钶뛠隶뛠鮶뛠鶶뛠龶뛠ꆶ뛠ꎶ뛠ꖶ뛠Ꞷ뛠ꦶ뛠ꮶ뛠궶뛠꾶뛠놶뛠뒶뛠뚶뛠뢶뛠몶뛠붶럠膷럠获럠薷럠誷럠邷럠銷럠钷럠颷럠骷਍럠鲷럠麷럠ꚷ럠ꢷ럠ꪷ럠겷럠꺷럠늷럠뒷룠芸룠蒸룠蚸룠袸룠誸룠貸룠躸룠邸룠銸룠钸룠隸룠颸룠骸룠鲸룠麸룠ꂸ룠ꊸ룠꒸룠ꚸ룠ꢸ룠ꪸ룠겸룠꺸਍룠낸룠늸룠뒸룠뚸룠뢸룠몸룠肹맠芹맠蒹맠蚹맠袹맠誹맠貹맠躹맠邹맠銹맠钹맠隹맠颹맠骹맠膺뫠蒺뫠螺뫠覺뫠貺뫠躺뫠邺뫠銺뫠钺뫠隺뫠颺뫠骺਍뫠鲺뫠麺뫠ꂺ뫠ꊺ뫠ꖺ뫠ꢺ뫠ꪺ뫠겺뫠꺺뫠낺뫠늺뫠뒺뫠뚺뫠뢺뫠몺뫠벺뫠肻믠芻믠蒻믠袻믠誻믠費믠躻믠醻믠鎻믠閻믠鞻믠馻믠鶻믠龻볠膼볠莼਍볠薼볠螼볠覼볠讼볠趼볠込볠醼볠钼볠馼볠鮼볠鶼볠龼볠ꆼ볠ꎼ볠ꖼ볠Ꞽ볠ꦼ볠ꮼ볠궼볠꾼볠놼볠뎼볠뢼볠벼볠뺼볠肽뷠芽뷠蒽뷠蚽뷠覽뷠讽뷠趽਍뷠辽뷠醽뷠鎽뷠閽뷠鞽뷠馽뷠鮽뷠鶽뷠龽뷠ꆽ뷠ꎽ뷠ꖽ뷠ꞽ뷠ꦽ뷠ꮽ뷠놽뷠뎽뷠떽뷠랽뷠립뷠뮽뷠붽뷠뾽뻠膾뻠莾뻠薾뻠覾뻠设뻠趾뻠达뻠醾뻠鎾਍뻠閾뻠鞾뻠骾뻠鲾뻠麾뻠ꂾ뻠ꊾ뻠꒾뻠ꚾ뻠ꢾ뻠ꪾ뻠겾뻠꺾뻠낾뻠늾뻠뒾뻠뚾뻠뢾뻠몾뻠벾뻠뾾뿠膿뿠莿뿠薿뿠螿뿠覿뿠访뿠躿뿠邿뿠銿뿠钿뿠隿਍뿠颿胡膀胡莀胡薀胡螀胡覀胡讀胡趀胡辀胡醀胡鎀胡門胡鞀胡馀胡鮀胡鶀胡龀胡ꆀ胡ꎀ胡ꖀ胡Ꞁ胡ꦀ胡ꮀ胡궀胡꾀胡놀胡뎀胡떀胡란胡릀胡뮀胡부਍胡뾀臡膁臡莁臡薁臡螁臡要臡讁臡趁臡辁臡醁臡鎁臡閁臡鞁臡馁臡鮁臡鶁臡龁臡ꆁ臡ꎁ臡ꖁ臡ꞁ臡ꦁ臡ꮁ臡궁臡꾁臡놁臡뎁臡떁臡랁臡릁臡뮁臡북਍臡뾁苡膂苡莂苡薂苡螂苡覂苡讂苡趂苡辂苡醂苡鎂苡閂苡鞂苡馂苡鮂苡鶂苡龂苡ꆂ苡ꎂ苡ꖂ苡Ꞃ苡ꦂ苡ꮂ苡궂苡꾂苡놂苡뎂苡떂苡랂苡릂苡뮂苡붂਍苡뾂菡膃菡莃菡薃菡趃菡醃菡鎃菡閃菡鞃菡馃菡鮃菡鶃菡龃菡ꆃ菡ꎃ菡ꖃ菡ꞃ菡ꦃ菡ꮃ菡궃菡꾃菡놃菡뎃菡떃菡랃菡릃菡뮃菡붃菡뾃蓡膄蓡莄蓡薄਍蓡螄蓡覄蓡讄蓡趄蓡辄蓡醄蓡鎄蓡閄蓡鞄蓡馄蓡鮄蓡鶄蓡龄蓡ꆄ蓡ꎄ蓡ꖄ蓡Ꞅ蓡ꦄ蓡ꮄ蓡궄蓡꾄蓡놄蓡뎄蓡떄蓡랄蓡름蓡뮄蓡분蓡뾄藡膅藡莅藡薅਍藡螅藡覅藡讅藡超藡辅藡醅藡鎅藡閅藡鞅藡馅藡鮅藡鶅藡龅藡ꆅ藡ꎅ藡ꖅ藡ꞅ藡ꦅ藡ꮅ藡궅藡꾅藡놅藡뎅藡떅藡랅藡릅藡뮅藡붅藡뾅蛡膆蛡莆蛡薆਍蛡螆蛡覆蛡讆蛡趆蛡辆蛡醆蛡鎆蛡閆蛡鞆蛡馆蛡鮆蛡鶆蛡龆蛡ꆆ蛡ꎆ蛡ꖆ蛡Ꞇ蛡ꦆ蛡ꮆ蛡궆蛡꾆蛡놆蛡뎆蛡떆蛡랆蛡릆蛡뮆蛡붆蛡뾆蟡膇蟡莇蟡薇਍蟡螇蟡覇蟡讇蟡趇蟡辇蟡醇蟡鎇蟡閇蟡鞇蟡馇蟡鮇蟡鶇蟡龇蟡ꆇ蟡ꎇ蟡ꖇ蟡ꞇ蟡ꦇ蟡ꮇ蟡궇蟡꾇蟡놇蟡뎇蟡떇蟡랇蟡릇蟡뮇蟡붇蟡뾇裡膈裡莈裡薈਍裡螈裡覈裡讈裡趈裡辈裡醈裡鎈裡閈裡鞈裡馈裡鮈裡鶈裡龈裡ꆈ裡ꎈ裡ꖈ裡ꞈ裡ꦈ裡ꮈ裡궈裡꾈裡놈裡뎈裡떈裡랈裡릈裡뮈裡불裡뾈觡膉觡莉觡薉਍

Here is our code so our AI can utilize. This is useful for extended conversations with less tokens, for example. You can prompt: “Lets learn base4096” and provide the links ZCHG Publishes a Release of Base4096 V2.0.0 - #7 by Josef_Founder - Software Development - Charg (CHG) - zchg.org - Web Four, it's YOURS! and ZCHG Publishes a Release of Base4096 V2.0.0 - #6 by Josef_Founder - Software Development - Charg (CHG) - zchg.org - Web Four, it's YOURS! Your AI will fill in the blanks, if your AI is behaving. That is the caveat..

---BEGIN BASE4096 SIGNATURE---
Version: 1
Hash: SHA-256
Domain: ZCHG-Base4096-Fingerprint
Length: 256
Alphabet-Fingerprint:
ˉۀଉתֲߊͪᅬMოൢЏ࿂ב৩Čཤᅏʽ෦ʵ႗ჸྛAྻၻဣᅶఙ൱eሠႩrڽøԖിՃႅᄚࡑᅹิॄࠩǡǠ๒ᅝሯ؍Ʌ͛ȑถౘ੨Ӧࢤ๖ϧŜ
แ࣍́ȥሰۇUઐሱܵဵҕಽðӦ˫ԁପୈႶఃઉॾ໓ܐണพڽ࢞ߴЍÊྨ༼ࡣ๑گˠয়ຢԃഡଏĔॅ໐ᄴࡖ֮ಙÎۦׯʹԤ٢ྯƞعਙѾٺచሡ
ݵ}۴Dzฦďࣔஉ૽ૢʔ੭yജ२ᆙၧљӗມᆧખથᅇࠂඅ௹ʫtමჺાѸሡྥᄱࠛࡌϕց෯໙Нܕࢀřݜմ๊ऐʩٕܟ़ࡵNjࠧڰࣿໍαा၏൴
࿑ɽ̚ঙӀ࡛¨ၨҩৗཙر൫൦༝ᆡӀǮΊô¦Ɖࡑ୦ලৌ၍ਚၤ༨ԾඤभუႤթе࠺ӉǦ͙ᄙવȡݛࡶɩวţ่ஒי̯ɭଏѝलઢরˠעճౌ૭
---END BASE4096 SIGNATURE---
# base4096.py
# Author: Josef Kulovany - ZCHG.org
# Dynamic Base-4096 Encoder/Decoder with Extended Alphabet

import unicodedata
import os

# Generate or load the base4096 character set
def generate_base4096_alphabet(seed):
    seen = set()
    base_chars = []

    # Include seed chars first
    for ch in seed:
        if ch not in seen:
            seen.add(ch)
            base_chars.append(ch)

    # Fill to 4096 with valid Unicode chars
    for codepoint in range(0x20, 0x30000):
        c = chr(codepoint)
        if c not in seen and is_valid_char(c):
            base_chars.append(c)
            seen.add(c)
            if len(base_chars) == 4096:
                break

    if len(base_chars) < 4096:
        raise ValueError("Failed to generate 4096 unique characters.")
    
    return ''.join(base_chars)

# Validity check
def is_valid_char(c):
    try:
        name = unicodedata.name(c)
        return not any(x in name for x in ['CONTROL', 'PRIVATE USE', 'SURROGATE', 'UNASSIGNED', 'TAG'])
    except ValueError:
        return False

SEED = (
    "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
    "!@#$%^&*()-_+=[{]};:',\"<>?/" + ''.join(chr(i) for i in range(0x00, 0x42))
)

def load_frozen_alphabet(filepath="frozen_base4096_alphabet.txt") -> str:
    if not os.path.exists(filepath):
        raise FileNotFoundError(f"Frozen alphabet file not found: {filepath}")
    with open(filepath, "r", encoding="utf-8") as f:
        alphabet = f.read().strip()
    if len(alphabet) != 4096:
        raise ValueError("Frozen alphabet length is not 4096 characters.")
    return alphabet

try:
    BASE4096_ALPHABET = load_frozen_alphabet()
except Exception as e:
    # Optional fallback, but warn
    print(f"Warning: Could not load frozen alphabet: {e}")
    print("Falling back to internal seed (not recommended).")
    BASE4096_ALPHABET = generate_base4096_alphabet(SEED)

CHAR_TO_INDEX = {ch: idx for idx, ch in enumerate(BASE4096_ALPHABET)}

# Encoder: bytes → base4096 string
def encode(data: bytes) -> str:
    num = int.from_bytes(data, byteorder='big')
    result = []
    while num > 0:
        num, rem = divmod(num, 4096)
        result.append(BASE4096_ALPHABET[rem])
    return ''.join(reversed(result)) or BASE4096_ALPHABET[0]

# Decoder: base4096 string → bytes
def decode(encoded: str) -> bytes:
    num = 0
    for char in encoded:
        if char not in CHAR_TO_INDEX:
            raise ValueError(f"Invalid character in input: {repr(char)}")
        num = num * 4096 + CHAR_TO_INDEX[char]
    # Determine minimum byte length
    length = (num.bit_length() + 7) // 8
    return num.to_bytes(length, byteorder='big')