Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: dbbit on March 21, 2014, 10:21:43 PM



Title: Base58 without bigint?
Post by: dbbit on March 21, 2014, 10:21:43 PM
Does anybody have an snippet or theoretical algorithm available that can encode a byte array to Base58 without using BitInt? (Instead using chunks or some other technique).

I can do this in my sleep for Base64, but Base58 makes my head hurt.


I created a blockchain scanner, and it's spending 70% of it's life now in the Base58 address conversion (Using BigInt from BouncyCastle). Argh.

- Deon


Title: Re: Base58 without bigint?
Post by: ScripterRon on March 21, 2014, 11:35:13 PM
I have a Java Base58 encoder/decoder which works directly with the byte array.  But I don't know that it is any faster than what you are using.  If you want to check it out, https://github.com/ScripterRon/BitcoinWallet/tree/master/src/BitcoinWallet/Base58.java


Title: Re: Base58 without bigint?
Post by: dbbit on March 22, 2014, 03:03:55 AM
I have a Java Base58 encoder/decoder which works directly with the byte array.  But I don't know that it is any faster than what you are using.  If you want to check it out, https://github.com/ScripterRon/BitcoinWallet/tree/master/src/BitcoinWallet/Base58.java

MOD by long division. Far out!

Thanks!