Comments (7)
I agree. Ideally I want to make another crate that does huffman coding and make a third crate that is a parent of both that exposes the traits. Not sure on the architecture or how to go about that without more thought. I think they should use the same API and be interchangeable to give users the choice between accuracy/compression or the speed of Huffman. And or whatever methods others would want to make. Something as simple as RLE should be able to use the same API.
Honestly I am not sold on the API of this crate in general and would be open to reworking it. I think it’s clunky right now.
from arcode-rs.
I'll have a think about whether I have anything I can contribute here. I'm just reading up on arithmetic coding for a specific project, so I'm fairly new to this.
In my case, I probably also need to be generic over 'symbols' in the sense that they could be characters, numbers, or enums.
from arcode-rs.
Well in the end they’re all just bits and it just matters how you interpret them. So that’s another decision point whether a user should just deal with bits or have the user friendliness of types.
I think there’s a lot of convenience crates and tools to be made in the compression space.
from arcode-rs.
i guess i was thinking of something along the lines of
trait Model {
type T;
fn range(context: &[T], symbol: T) -> Interval;
}
impl Model for arcode::SourceModel {
type T = u32;
// etc.
}
no idea if that would actually work...
Well in the end they’re all just bits and it just matters how you interpret them
that's not true in the general case though right? For example if you were to encode a vector of enums you have a few choices about how you might do that, but it's not 'bits'
from arcode-rs.
for some context, i'm planning to do lossy compression of floats, integers, and strings similar to this spec - https://libdccl.org/codecs.html
from arcode-rs.
i drafted an example of what this might look like - https://github.com/danieleades/arithmetic-coding.
it's a little rough, but you get the idea. I'm still very new to arithmetic coding (and compression in general)
Interested to hear your thoughts
from arcode-rs.
my implementation of this using a Model
trait is pretty mature now (actually it kind of grew arms and legs). I'll close this issue, since i don't think there's any action here.
I think the best way forward for this crate if it were to use a Model
trait would be to import the trait from my crate, and implement it for the fenwick tree based models in this crate. You'd be more than welcome to re-export the encoder/decoder too if that's useful. they're pretty quick, because they don't use any floating point arithmetic.
Thank you for the inspiration!
from arcode-rs.
Related Issues (2)
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 arcode-rs.