Compare commits
2 Commits
cca8f02870
...
8b0fbfdcf7
Author | SHA1 | Date | |
---|---|---|---|
![]() |
8b0fbfdcf7 | ||
![]() |
75c0ac1997 |
7
Makefile
Normal file
7
Makefile
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
libeebie.so:
|
||||||
|
$(CC) -shared -g -O2 -o libeebie.so eebie/reader.c eebie/writer.c
|
||||||
|
|
||||||
|
install:
|
||||||
|
install -d /usr/local/include/eebie
|
||||||
|
install eebie/*.h /usr/local/include/eebie
|
||||||
|
install libeebie.so /usr/local/lib
|
@ -32,7 +32,8 @@ static int bit_length(uint64_t i) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static uint64_t encode_int(uint64_t i) {
|
static uint64_t encode_int(uint64_t i) {
|
||||||
return i | VARINT_MASKS[(bit_length(i) + 6) / 7];
|
// bit_length(i + 1) over bit_length(i) because 0xFF... lengths are interpreted as indefinite
|
||||||
|
return i | VARINT_MASKS[(bit_length(i + 1) + 6) / 7];
|
||||||
}
|
}
|
||||||
|
|
||||||
static void advance(EBMLWriter *this, uint64_t amount) {
|
static void advance(EBMLWriter *this, uint64_t amount) {
|
||||||
|
Loading…
Reference in New Issue
Block a user