On Sat, Mar 29, 2025 at 05:27:10AM +0000, softworkz wrote: > From: softworkz <softworkz@hotmail.com> > > Signed-off-by: softworkz <softworkz@hotmail.com> > --- > [RFC] fftools/resorces: Add resource_manager with build-time compression > > Hello everybody, > > this is a resource manager implementation which I've done for the > upcoming execution graph rendering patchset, which needs some css and > http strings for generating the output and I wanted check back whether > it's okay to do it that way? > > To minimize the amount of storage required, it is using compression at > build time, inspired from the PTX compresion that is already in employed > for compresing CUDA kernels. The purpose is to allow having the actual > content in the tree, viewable and editable as reeguar html or css files > rather than a cryptic string that is handcrafted by the developer. > > For CSS files, it also applies some minification: Comment lines are > removed, linebreaks removed and whitespace is folded, then it gets > compressed and finally added as data via BIN2C. Same for html but > without minification. > > In case of PTX compression there's a configure option to disable, hence > I'm wondering whether I might need to do the same if there are any cases > where it doesn't work? > > Thanks > > (note that the two css and html files are identical - it's just for > illustration). > > Published-As: https://github.com/ffstaging/FFmpeg/releases/tag/pr-ffstaging-63%2Fsoftworkz%2Fsubmit_resourcerfc-v1 > Fetch-It-Via: git fetch https://github.com/ffstaging/FFmpeg pr-ffstaging-63/softworkz/submit_resourcerfc-v1 > Pull-Request: https://github.com/ffstaging/FFmpeg/pull/63 out of tree build with mingw64 on ubuntu src/fftools/resources/resman.c: In function ‘decompress_gzip’: src/fftools/resources/resman.c:78:5: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement] 78 | uint8_t *buf = (uint8_t *)av_mallocz(chunk + 1); | ^~~~~~~ src/fftools/resources/resman.c: At top level: src/fftools/resources/resman.c:194:1: fatal error: opening dependency file fftools/resources/resman.d: No such file or directory 194 | } | ^ compilation terminated. make: *** [src/ffbuild/common.mak:81: fftools/resources/resman.o] Error 1 STRIP ffprobe.exe make: Target 'all' not remade because of errors. [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB No snowflake in an avalanche ever feels responsible. -- Voltaire