#include #pragma once typedef struct entropy_ctx { size_t freq[256]; size_t total_bytes; } entropy_ctx; void entropy_init(entropy_ctx *ctx); void entropy_update(entropy_ctx *ctx, const unsigned char *buf, size_t len); double entropy_final(entropy_ctx *ctx);