#pragma once /* The idea 'borrows' from cpio: it's basically a concatenation of {header, filename, file} data. Header, filename and file data is 32-bit aligned. The last file is indicated by data-less header with the FLAG_LASTFILE flag set. */ #include #define FLAG_LASTFILE (1<<0) #define FLAG_GZIP (1<<1) #define COMPRESS_NONE 0 #define COMPRESS_HEATSHRINK 1 #define ESPFS_MAGIC 0x73665345 /* ASCII sequence of bytes 'E' 'S' 'f' 's' interpreted as a little endian uint32_t */ /* 16 bytes long for alignment */ typedef struct { uint32_t magic; uint8_t flags; uint8_t compression; uint16_t nameLen; uint32_t fileLenComp; uint32_t fileLenDecomp; } __attribute__((packed)) EspFsHeader;