You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
665 B
26 lines
665 B
2 years ago
|
#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 <stdint.h>
|
||
|
|
||
|
#define FLAG_LASTFILE (1<<0)
|
||
|
#define FLAG_GZIP (1<<1)
|
||
|
#define COMPRESS_NONE 0
|
||
|
#define COMPRESS_HEATSHRINK 1
|
||
|
#define ESPFS_MAGIC 0x73665345 /* ASCII ESfs - when read as little endian */
|
||
|
|
||
|
/* 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;
|