Giter Site home page Giter Site logo

lemire / littleintpacker Goto Github PK

View Code? Open in Web Editor NEW
84.0 6.0 9.0 87 KB

C library to pack and unpack short arrays of integers as fast as possible

License: Apache License 2.0

C 97.32% Makefile 0.23% Python 2.45%
integer integer-compression compression performance

littleintpacker's Issues

strict aliasing violation?

hi, i'm reading through the simd version and this to gain some familiarity as to what's going on and what techniques are being used. does this line not violate strict aliasing?

uint64_t * pw64 = *(uint64_t **) pw;

Decoded size doesnt match encoded size.

Hey Guys,

A small code used to show the problem i m facing using streamvbytes library on linux

#include <stdint.h>
#include <streamvbyte.h>
#include <malloc.h>
#include <stdio.h>

int main( void )
{
size_t encoded = 0, decoded = 0;
uint8_t *set = malloc( 1024 );
uint32_t entry[ 2 ];

entry[ 0 ] = 10;
entry[ 1 ] = 0;

encoded += streamvbyte_encode( entry, 2, set );
for( size_t i = 0; i < 2; i++ ) {
decoded += streamvbyte_decode( set + decoded, entry, 1 );
}
printf( "encoded size : %zd vs decoded size : %zd\n", encoded, decoded );
free( set );

return 0;
}

When I run this code I got this output ๐Ÿ‘

encoded size : 3 vs decoded size : 4

Can you help me finding the issue ?

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.