From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> To: ffmpeg-devel@ffmpeg.org Subject: Re: [FFmpeg-devel] [PATCH WIP 01/10] ffbuild/bin2c: Use zlib directly instead of gzip Date: Mon, 16 Jun 2025 21:24:19 +0200 Message-ID: <GV1P250MB0737D03FB3F143EA90DF588A8F70A@GV1P250MB0737.EURP250.PROD.OUTLOOK.COM> (raw) In-Reply-To: <DM8P223MB0365A94011730F8302DFDF16BA70A@DM8P223MB0365.NAMP223.PROD.OUTLOOK.COM> softworkz .: > >> -----Original Message----- >> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of >> Andreas Rheinhardt >> Sent: Monday, June 16, 2025 8:52 PM >> To: ffmpeg-devel@ffmpeg.org >> Subject: Re: [FFmpeg-devel] [PATCH WIP 01/10] ffbuild/bin2c: Use zlib >> directly instead of gzip >> >> softworkz .: >>> >>> >>>> -----Original Message----- >>>> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of >>>> Andreas Rheinhardt >>>> Sent: Dienstag, 3. Juni 2025 16:34 >>>> To: ffmpeg-devel@ffmpeg.org >>>> Subject: Re: [FFmpeg-devel] [PATCH WIP 01/10] ffbuild/bin2c: Use zlib >>>> directly instead of gzip >>>> >>> >>> Hi Andreas, >>> >>> thinking about the direction of this patchset, I came to this idea: >>> >>> How about ditching zlib altogether for this and replace it with some >>> compact compression code right away? >>> >>> Something like these might be suitable: >>> >>> https://github.com/ariya/FastLZ/blob/master/fastlz.c >>> https://github.com/richgel999/miniz/blob/master/miniz.c >>> (licenses should be compatible for including the code) >>> >>> >>> This would solve both problems: >>> >>> - zlib detection during build >>> - zlib being unavailable at runtime when linked dynamically >>> >>> >>> How do you think about this? >>> >>> I think it wouldn't matter when the compression is slightly less effective.. >>> > > Hi Andreas, > >> The compressed objects will be included in many binaries (and I guess that >> most users will never ever use them...). They should therefore be as small as >> possible. > > What I meant is that when it would be like 5 or 10% less in compression ratio, > the benefits would still outweigh. But I suppose you'll get pretty close to zlib > anyway. I'll try your tiny compression libaries as well as zlib and brotli and report back. > >> But the approach of simply including the code for compression is a good one. >> It solves the zlib-detection-during-build problem and the .text size of the >> encoding code does not matter given that bin2c only exists on the dev >> machine. I'll implement this. > > And - as I just realized after suggesting it - there are even more benefits: > > - the dual code paths for handling compressed/non-compressed resources > Will become obsolete > - same for the conditional pattern rules in common.mak > - and finally, the configure parameters --disable-ptx-compression and > --disable-resource-compression can be dropped as well I do not intend to remove these options; in fact, we will always have to keep the codepath for creating uncompressed objects (because otherwise we would make zlib a hard requirement on the target system). > > All in all it will be a big win on several sides. Sounds like a good plan 😊 > > Thanks, > sw > _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
next prev parent reply other threads:[~2025-06-16 19:24 UTC|newest] Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top 2025-06-02 2:38 Andreas Rheinhardt 2025-06-02 3:22 ` softworkz . 2025-06-02 22:33 ` softworkz . 2025-06-03 14:33 ` Andreas Rheinhardt 2025-06-03 14:47 ` softworkz . 2025-06-11 3:05 ` softworkz . 2025-06-16 18:51 ` Andreas Rheinhardt 2025-06-16 19:15 ` softworkz . 2025-06-16 19:24 ` Andreas Rheinhardt [this message] 2025-06-16 20:18 ` softworkz . 2025-06-16 22:15 ` Andreas Rheinhardt 2025-06-17 9:29 ` Nicolas George 2025-06-17 13:23 ` softworkz . 2025-06-17 14:09 ` Nicolas George 2025-06-17 14:35 ` softworkz . 2025-06-17 14:40 ` Nicolas George 2025-06-17 14:41 ` James Almer 2025-06-17 14:51 ` softworkz . 2025-06-18 7:09 ` Nicolas George
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=GV1P250MB0737D03FB3F143EA90DF588A8F70A@GV1P250MB0737.EURP250.PROD.OUTLOOK.COM \ --to=andreas.rheinhardt@outlook.com \ --cc=ffmpeg-devel@ffmpeg.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel This inbox may be cloned and mirrored by anyone: git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \ ffmpegdev@gitmailbox.com public-inbox-index ffmpegdev Example config snippet for mirrors. AGPL code for this site: git clone https://public-inbox.org/public-inbox.git