circuitpython/lib/memzip
Diego Elio Pettenò dd5d7c86d2 Fix up end of file and trailing whitespace.
This can be enforced by pre-commit, but correct it separately to make it easier to review.
2020-06-03 10:56:35 +01:00
..
README.md Fix up end of file and trailing whitespace. 2020-06-03 10:56:35 +01:00
import.c lib/memzip: Factor out memzip from teensy/ into lib/memzip. 2015-11-04 14:21:10 +00:00
lexermemzip.c Fix up end of file and trailing whitespace. 2020-06-03 10:56:35 +01:00
make-memzip.py Fix up end of file and trailing whitespace. 2020-06-03 10:56:35 +01:00
memzip.c lib/memzip: Factor out memzip from teensy/ into lib/memzip. 2015-11-04 14:21:10 +00:00
memzip.h lib/memzip: Factor out memzip from teensy/ into lib/memzip. 2015-11-04 14:21:10 +00:00

README.md

MEMZIP - a simple readonly file system

memzip takes a zip file which is comprised of uncompressed files and and presents it as a filesystem, allowing Python files to be imported.

The script make-memzip.py takes a directory name and will create a zip file containing uncompressed files found in the directory. It will then generate a C file which contains the data from the zip file.

A typical addition to a makefile would look like:

SRC_C += \
    lib/memzip/import.c \
    lib/memzip/lexermemzip.c \
    lib/memzip/memzip.c \

OBJ += $(BUILD)/memzip-files.o

MAKE_MEMZIP = ../lib/memzip/make-memzip.py

$(BUILD)/memzip-files.o: $(BUILD)/memzip-files.c
    $(call compile_c)

$(BUILD)/memzip-files.c: $(shell find ${MEMZIP_DIR} -type f)
    @$(ECHO) "Creating $@"
    $(Q)$(PYTHON) $(MAKE_MEMZIP) --zip-file $(BUILD)/memzip-files.zip --c-file $@ $(MEMZIP_DIR)