Giter Site home page Giter Site logo

dsi-bitstream-rs's People

Contributors

vigna avatar zacchiro avatar zommiommy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

dsi-bitstream-rs's Issues

Storing the total number of gaps inserted in CodesStats

Hi! Right now CodeStats does not store the number of gaps it has seen. It would be nice if it could store that as metadata so that I would not need to store it externally to compute the percentage of improvement over the naive baseline (storing the hashes themselves). Would it be okay if I added that as a u64?

pub struct CodesStats<
// How many ΞΆ codes to consider.
const ZETA: usize = 10,
// How many Golomb codes to consider.
const GOLOMB: usize = 20,
// How many Exponential Golomb codes to consider.
const EXP_GOLOMB: usize = 10,
// How many Rice codes to consider.
const RICE: usize = 10,
// How many Pi and Pi web codes to consider.
const PI: usize = 10,
> {
pub unary: u64,
pub gamma: u64,
pub delta: u64,
pub omega: u64,
pub vbyte: u64,
pub zeta: [u64; ZETA],
pub golomb: [u64; GOLOMB],
pub exp_golomb: [u64; EXP_GOLOMB],
pub rice: [u64; RICE],
pub pi: [u64; PI],
pub pi_web: [u64; PI],
}

make code base clippy-clean

currently we do not pass "cargo clippy" due to the following errors (there are also warnings, but they are not blocking):

error: read amount is not handled
  --> src/backends/file_backend.rs:68:9
   |
68 |         self.file.read(res.as_mut())?;
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: use `Read::read_exact` instead, or handle partial reads
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_io_amount
   = note: `#[deny(clippy::unused_io_amount)]` on by default

error: written amount is not handled
  --> src/backends/file_backend.rs:79:9
   |
79 |         self.file.write(word.to_ne_bytes().as_ref())?;
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: use `Write::write_all` instead, or handle partial writes
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_io_amount

Serde support

Hi! I am running CodesStats to identify which Code may be better for my use case (gaps in a sorted hash list).

I noticed that serde is wholly unsupported, and I would like to have the possibility to dump the Codes obtained by the analysis since I need to run several possible parameterizations. Is there any reason for the lack of serde? Otherwise, I can add that with a pull request.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.