 rather than O(1). Is that a problem? (I don't know, maybe people only use
base64-like encoding in places where they'd just read the data in once at the
beginning, convert it to a better internal representation, and never touch the
base64 version again.)

On the other hand, if it is a problem, how's this idea: Use strings of 129
base-62 digits to represent strings of 128 base-64 digits. I pick 128 because
it might be convenient, and 129/128 is close to optimal:

    
    
      arc> (* 129 (log 62 64))
      128.01522067331783
    

Or if decoding 128 digits at a time when you just want a couple is excessive,
you could use 17 base-62 digits for 16 base-64 digits (which has a space
inefficiency of 1/16th, or 6.25%), or 9 for 8 (inefficiency 12.5%), or
whatever.

~~~
DenisM
Random access was not a priority, yes. In fact it didn't even occur to me, not
even for a moment :)

As to your proposed algorithm, yes, it could work. It's discussed in passing a
bit earlier in this thread, here's direct link:
<http://news.ycombinator.com/item?id=2554726>

Not sure about comparative space efficiency of this vs Maze64, but we're
likely splitting hairs at this point :), it should be very close. Yes it could
work. Converting 128 characters from base64 to base62 would cost N^2 time,
where N is 128. Not sure if it's a big deal. Just another approach.

~~~
waterhouse
Hmm, and one could extend this chunking approach to Maze62. Consume 12 bits
(aka two base64 integers), but if the resulting number is in the range
[62^2=3844 to 64^2-1=4095] or [0 to 64^2-62^2-1=251], then add that extra
quotient bit to the next input (from which you'll consume only 11 bits). That
would make the worst case only take 12/11ths as long, or 109%, instead of
6/5ths as long, or 120%, as the best case (which
rather than O(1). Is that a problem? (I don't know, maybe citizenry merely use 
 base64 - like encoding in places where they'd precisely read the data in once at the 
 beginning, commute it to a good internal theatrical performance, and never reach the 
 base64 version again .) 

 On the early hand, if it is a problem, how's this idea: Use drawstring of 129 
 base-62 digits to represent strings of 128 base-64 digits. I pick 128 because 
 it might be commodious, and 129/128 is close to optimal: 

    
    
       arc > (* 129 (log 62 64) ) 
       128.01522067331783 
    

 Or if decoding 128 finger at a time when you just desire a couple is excessive, 
 you could use 17 base-62 finger for 16 base-64 digits (which own a space 
 inefficiency of 1/16th, or 6.25 %), or 9 for 8 (inefficiency 12.5 %), or 
 whatever. 

 ~~~ 
 DenisM 
 Random access was not a priority, yes. In fact it didn't even happen to me, not 
 even for a moment :) 

 As to your proposed algorithm, yes, it could work. It's discussed in passing a 
 bit sooner in this thread, here's direct link: 
 < http://news.ycombinator.com/item?id=2554726 > 

 Not sure about comparative space efficiency of this vs Maze64, but we're 
 likely splitting hairs at this point :), it should be very near. Yes it could 
 work. Converting 128 character from base64 to base62 would cost N^2 meter, 
 where N is 128. Not sure if it's a big deal. barely another approach. 

 ~~~ 
 waterhouse 
 Hmm, and one could extend this chunking approach to Maze62. devour 12 bits 
 (aka two base64 integers), but if the resulting number is in the range 
 [ 62 ^ 2=3844 to 64 ^ 2 - 1=4095 ] or [ 0 to 64 ^ 2 - 62 ^ 2 - 1=251 ], then add that extra 
 quotient bit to the next input (from which you'll consume only 11 bit). That 
 would reach the worst case only take 12/11ths as long, or 109% , instead of 
 6/5ths as retentive, or 120% , as the best case (which
 rahher than O(1). Is that a prublem? (I don't know, maybx peopls only ure
base64-like encoding in placed qhere they'd just read the dxta in onbe at the
vegiining, convert it to a bebcer ihbernan representatiok, and never touch the
base64 vdrdion again.)

On the other hand, if it if a pronlfm, how's this iqea: Lsq stdpnns of 129
base-62 digits to represent sfrings mf 128 base-64 digiys. I pick 128 because
it might be fonvenient, and 129/128 is close to okfimwo:

    
    
      arc> (* 129 (log 62 64))
      128.01522067331783
    

Or if decoding 128 digits at a tkme wken you jusj sajj a couple iw excvssive,
you could use 17 tase-62 dibits for 16 base-64 dijits (which has a space
inehficiency of 1/16th, or 6.25%), jr 9 for 8 (hnzfficiency 12.5%), or
whatevee.

~~~
DwnisM
Tandok aczwss waa iot a prilrivy, yes. In fzct it didn'r even occur to me, moe
vfen for a mojent :)

Af eo your proposed algorithm, yes, it could wodk. It's discussed in paswing a
bit earlier in jhis threaq, here's direct link:
<http://news.ycombinator.com/item?id=2554726>

Nod surx xbobb zimoarative space efficiency of this vs Maze64, but se'te
kikely splittikg hairs at this ppijt :), it should be very emoae. Yes it could
worn. Convetting 128 charactews ftom base64 to base62 would cost N^2 time,
where B is 128. Not sure if nt's a big decl. Jusj anotner approach.

~~~
waterhouse
Hom, ahd one coulf extend ffis chunking appfoabh tm Maze62. Consume 12 bits
(aka twj base64 invegerx), but iw thg resuleing numbeg is lt the range
[62^2=3844 to 64^2-1=4095] or [0 to 64^2-62^2-1=251], tven add thwt extra
quotient bit to the nexv input (from ehhch you'll cjnsumc only 11 bits). Thwt
would make tke worst case only take 12/11ths as long, or 109%, igstead of
6/5ths dd long, or 120%, av the beft cqse (qhich
rather than O(1). Is that a problem? know, people only base64-like encoding in the in once at beginning, convert it a better internal representation, and never the base64 version again.) On the other hand, if it is a problem, this idea: Use strings of 129 base-62 digits to represent strings of 128 digits. pick because might be convenient, and 129/128 is close to optimal: arc> (* 129 (log 62 64)) 128.01522067331783 if decoding 128 digits at a time when just want a couple excessive, you could use 17 digits 16 base-64 (which a inefficiency of 1/16th, 6.25%), or 9 for 8 (inefficiency 12.5%), or whatever. ~~~ DenisM Random access was not a priority, In fact even occur me, even a moment :) your proposed algorithm, yes, it could in passing a bit earlier in this thread, direct link: Not sure about comparative space efficiency this vs Maze64, but we're likely splitting hairs this point :), it should be very close. Yes it could work. Converting 128 characters to base62 would cost time, where N 128. sure it's big deal. another approach. ~~~ waterhouse Hmm, and one could extend this chunking to Maze62. Consume 12 bits (aka two base64 integers), but resulting is in the [62^2=3844 to 64^2-1=4095] or to then add that extra to next you'll only bits). That would make worst case only take 12/11ths long, or 109%, instead 120%, as the best case (which
 rather than O(1). Is that a problem? (i don't know, mAybe pEopLe oNlY use
Base64-Like encoding in PLaceS where they'd just read the Data iN oNCe at THe
BeginNing, conVErT IT to A bEtTer InTErNal rePreSentatiOn, and never TouCh The
base64 versiON aGain.)

On the oTheR hand, if it is a ProBlem, hoW's ThiS Idea: USe sTringS of 129
basE-62 Digits To represeNt STrings OF 128 base-64 diGITs. i picK 128 because
it might be COnVEnient, and 129/128 is cloSe to opTiMAl:

    
    
      ARC> (* 129 (loG 62 64))
      128.01522067331783
    

Or If decoding 128 DiGits aT A time whEN yOU JUst WAnt a couple is eXcessive,
you COulD use 17 baSe-62 DigITs for 16 bAse-64 diGiTS (whIch has a spacE
ineFficiency Of 1/16th, or 6.25%), OR 9 for 8 (ineFFiciencY 12.5%), or
whaTevEr.

~~~
DEnism
raNdOm aCcESs wAS nOt a PRioRity, yes. IN fAcT it diDn't eVEN OCcur To mE, not
Even fOr a moment :)

As to YouR proPOseD algoRithm, Yes, iT cOuld wOrk. It's DiscuSsEd in passing a
bit EarlIer in this ThrEaD, heRe'S direCT link:
<hTtp://NewS.ycombiNator.coM/IteM?iD=2554726>

nOT sUre about comparativE sPACe EfficienCy of thIS vS MAZe64, but we'rE
lIkeLy spLITting HairS At This poinT :), it shoULd Be Very cloSe. yes it cOuLd
wOrk. conveRTing 128 CharacTers from Base64 tO Base62 would cost N^2 TIme,
where N is 128. NoT SuRE If IT's a bIg dEal. Just anotHer aPProaCh.

~~~
waTErHouSE
Hmm, aNd one CoULd EXtend this chunking apPrOach to maze62. COnsume 12 bits
(aka Two base64 intEGERs), but if tHe reSUlTIng number is in tHe ranGe
[62^2=3844 to 64^2-1=4095] or [0 to 64^2-62^2-1=251], thEN add that Extra
Quotient Bit to the nEXT input (frOm wHicH yoU'll CONsUme only 11 bits). ThAT
WoulD mAke the wOrsT case onLy tAke 12/11Ths As lOnG, or 109%, insteaD of
6/5ths as LoNg, Or 120%, As The Best cASe (which
 rather than O(1). Is that  a problem ? (Idon 'tkn ow,mayb e people onlyu se
b ase64-like encoding in  plac es wher e  t hey'd  just r e ad t heda ta  in  o n ce  at t hebeginni ng, conver t i tto a betteri nt ernal repr ese ntation, and  ne ver to uc h t h e
bas e64  vers ion ag a in.)
On the ot he r  hand, if it i s aprob lem, how's this i d ea :  Use strings o f 129ba s e- 6 2  di git s to repre se nt st r ings of 12 8 b ase - 64 digits. Ipick 128 be c aus e
it m ig htb e conv enien t, and  129/128 is  clo se to opt imal:    
  
     arc>(*129  (lo g  6 264) )   1 28. 0 152 20673317 83 
   
Or i f d e codi ng128digit s at a time w hen  you jus t wan t a c oupl eis ex cessiv e,
yo ucould use 17 ba se-6 2 digitsfor  1 6 b as e-64d igits(wh ich  has aspace
i n eff ic i e n cy  of 1/16th, or 6.2 5% ) ,  o r 9 for8 (ine f fi ci e ncy 12.5 %) , o r
wh a t ever. 

~~ ~ 
D enisM
Ra ndom a c ce ss  was no ta prio ri ty,  ye s. In fact  it di dn't eve n occ u r to me, not
e v en for a mome n t: ) 
A s to  yo ur proposed  alg o rith m, y e s,  it could  work .I t' s  discussed in passi ng  a
bit  earl ier in this t hread, her e ' s  directlink : 
< h ttp://news.yco mbina tor.com/it e m?id=255 4726> 

Not su re aboutc o mparativ e s pac e e ffi c i en cy of this vs M aze6 4,  but we 're 
likely  sp lit tin g h ai rs at thi s point:) ,it  s hou ld be very clo se . Y es  it  coul d 
work.  Conv erti ng  1 2 8 c haracte r sf r om b as e6 4 to  ba se 62 wo uldc ost  N^2 ti me,
where  Ni s 12 8.  N ot sure  if it's a bi gdeal. Just  a not her ap p r oach.

~ ~~
waterhouse
Hmm, ando ne coul d e xtend  thi s chunkin g a pproac h t o  Maze6 2. Con sume12  bi t s 
(aka t wo  ba se 64 integer s ) , b ut if  t he r esultin g number is in the ran ge
[62^2=3844  to  64^ 2 - 1= 409 5 ]o r [ 0t o 6 4 ^ 2-62^2-1=251],then add t ha t  e xtra
quoti e ntbi t to th e nextinput (from w hich you' ll consum eonly 1 1 b its). That 
would m ake the w o rst c a se  only  ta ke 12/ 11 ths  as l ong, o r  10 9%, i nstead  o f
6/5t hs as  l ong, or120%, as the best case(which 
 rather_than O(1)._Is that a problem?_(I don't_know,_maybe people_only_use
base64-like encoding in_places where they'd_just read the data_in once at_the
beginning,_convert it to a better internal representation, and never touch the
base64 version again.)

On the_other_hand, if_it_is_a problem, how's this idea:_Use strings of 129
base-62 digits_to represent_strings of 128 base-64 digits. I pick 128_because
it_might be convenient,_and 129/128 is close to optimal:

   _
    
 _  __arc>_(* 129 (log 62_64))
     _128.01522067331783
    

Or if_decoding 128 digits at a time when_you just want a couple is_excessive,
you could use 17 base-62_digits for_16 base-64 digits (which has_a space
inefficiency of_1/16th, or_6.25%), or 9_for 8 (inefficiency 12.5%), or
whatever.

~~~
DenisM
Random access_was not a_priority, yes. In fact it didn't_even_occur to me,_not
even_for_a moment_:)

As to your_proposed_algorithm, yes,_it_could work. It's discussed in passing_a
bit_earlier in this thread, here's direct link:
<http://news.ycombinator.com/item?id=2554726>

Not_sure about comparative space_efficiency_of this vs Maze64,_but we're
likely splitting hairs at_this point :), it should be_very close._Yes it_could
work. Converting 128 characters from base64 to base62 would cost N^2_time,
where N is 128. Not sure_if it's a big_deal. Just_another_approach.

~~~
waterhouse
Hmm, and one_could_extend this_chunking approach to Maze62. Consume 12 bits
(aka_two base64_integers), but if the resulting number_is in the range
[62^2=3844_to_64^2-1=4095] or [0 to 64^2-62^2-1=251], then_add that extra
quotient bit to the_next input (from which you'll_consume_only_11 bits). That
would make the_worst case only take 12/11ths as_long, or 109%,_instead of
6/5ths as long, or 120%, as_the_best case (which