Comments (2)
Thanks for reaching out with your question!
Quick answer
No, base58 doesn't fit the goal of data-encoding.
Longer answer
You might be interested in using multibase which provides 2 variants of base58. It depends on data-encoding
and base-x
to provide those different base encodings. That said, if your concern is the crate getting updates, that won't be an option for you either. But I'd say that looking at most recent crate update is not an important decision factor for such trivial libraries. Base conversion only needs to be written once and it stays correct. Usually those crates only get updates to provide more Rust-y interface or convenience, but the core logic is really the same and won't change. All those crates (multibase
, base-x
, and base58
) seem to have approximately the same number of downloads, so I guess picking any of them should do.
More context about data-encoding's goal
This library only provides base conversion for powers of two fitting within ASCII (namely 2, 4, 8, 16, 32, and 64) because those are streamable encodings, which is necessary when the input length is unknown. Encodings like base58 don't have this property and can only realistically encode short inputs (which is fine for bitcoin and such). That's quite a different usecase. Maybe one day data-encoding may also provide something for those usecases, but right now this is not planned.
from data-encoding.
First, thank you very much for the comprehensive answer and the full context provided.
Everything makes sense.
-
You are correct; the fact that the narrow
base58
crate has not changed for a while is probably completely fine, given its narrow scope and the nature of its function. -
Thank you for the context about the "power of two" aspect of data-encoding. It makes total sense not to make any exceptions and to keep the crate focused. I definitely value focused crates, so this is very good to hear.
from data-encoding.
Related Issues (20)
- no-std support for macro crate
- Macros Won't Build in no_std HOT 4
- (std -> core)::fmt::Display for DecodeError and DecodeKind HOT 2
- feature `std` leaking when using macro in no_std env HOT 7
- Missing a new line and decode error HOT 2
- Rust 2021 edition is a major, not a "patch" change HOT 6
- Removing dependency on syn HOT 7
- Make `{encode,decode}_len` const fns? HOT 4
- Encode into an "impl std::fmt::Write" and/or "impl std::io::Write" HOT 5
- Breaking change wish list
- Use doc_auto_cfg once stable HOT 2
- Use as_chunks family of functions once stable
- Internal symbols array is publicly exposed and unsound HOT 4
- Deny warnings in rustdoc
- Partial encoding with padding HOT 3
- Question about Specification HOT 6
- Release 2.5.0
- SIMD optimization HOT 4
- `Encoding::encode_mut` is very code-size heavy HOT 15
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from data-encoding.