Merge Starkware branch

This commit is contained in:
BTChip github
2020-06-27 13:24:04 +02:00
parent 20e9f46c3c
commit 8d0544bf68
57 changed files with 4439 additions and 2243 deletions

21
src/poorstream.h Normal file
View File

@@ -0,0 +1,21 @@
#ifndef __POORSTREAM_H__
#define __POORSTREAM_H__
#include <stdbool.h>
#include <stdint.h>
#include <string.h>
#include "os.h"
typedef struct poorstream_t {
uint8_t *pointer;
uint32_t offset;
uint64_t mask;
uint64_t accumulator;
} poorstream_t;
void poorstream_init(poorstream_t *stream, uint8_t *buffer);
void poorstream_flush(poorstream_t *stream);
void poorstream_write_bits(poorstream_t *stream, uint64_t bits, uint32_t num_bits);
#endif