From nobody Fri Jul 29 16:06:43 2022 X-Original-To: freebsd-hackers@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4LvXTF3ts8z4Xc8g; Fri, 29 Jul 2022 16:06:57 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-ej1-f45.google.com (mail-ej1-f45.google.com [209.85.218.45]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4LvXTD5zl8z3W0x; Fri, 29 Jul 2022 16:06:56 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-ej1-f45.google.com with SMTP id l23so9315616ejr.5; Fri, 29 Jul 2022 09:06:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=HhHmeZVnHdEP3jMZmwH3e9iT7m/m8JQo8+L1Fx5akRM=; b=6a0caFE0dihIipls4FwAZQYFDdK1WONFZZymP7MhMC2OBLaM2HRGKoAzZpA27599c0 e2S9T8e0eGwTLjygPz75mKWmyr5KXsAX4xl+KK0u+yYJEOl9eUcIBZCTHE59/twMfXjK bV/LMR+Omj9I/hdgd+QyOyx8fA9OxZmW/GPpsYyrCogbLjAGbtFs+WjDGB3ZgOkedmXz 9Q7IpLcG451fEBVKx6/QMlU9VTgklsTSguueStGm9/y2uJSY54IB7TjzZiTppbp9FK9A s+Jo9woa22Z9y1u1Sak8vpcTWmxaU3ACz9EFnJRapi7S8j5JpvUuRBj4BwKE31dUOd3a ps6w== X-Gm-Message-State: AJIora+b0yYEml3bg+3sW46yzdnQp6N+f5Yn9LxRJl/8cZX3Vc+HKA45 In+HusD3MnaPUmQDXN6tUdz/yyKhDhzxNoACZu1cvN7Dje8= X-Google-Smtp-Source: AGRyM1v9Cw2QkDPqsUtdR0UtVh7RVxbf/2H3FPtXnC81pgOJjLcfkUsKsp/XsEgg4yoeqzobLKMiBudh6yVX2de16YA= X-Received: by 2002:a17:906:8478:b0:72b:4f81:29d8 with SMTP id hx24-20020a170906847800b0072b4f8129d8mr3352860ejc.179.1659110814830; Fri, 29 Jul 2022 09:06:54 -0700 (PDT) List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@freebsd.org MIME-Version: 1.0 References: <0d8e1b38-bcd2-0875-1864-3385c502646d@delphij.net> In-Reply-To: From: Ed Maste Date: Fri, 29 Jul 2022 12:06:43 -0400 Message-ID: Subject: Re: Proposal: remove /usr/bin/minigzip To: d@delphij.net Cc: Eugene Grosbein , freebsd-current , freebsd-hackers@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4LvXTD5zl8z3W0x X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of carpeddiem@gmail.com designates 209.85.218.45 as permitted sender) smtp.mailfrom=carpeddiem@gmail.com X-Spamd-Result: default: False [-3.10 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.996]; FORGED_SENDER(0.30)[emaste@freebsd.org,carpeddiem@gmail.com]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; MIME_GOOD(-0.10)[text/plain]; RWL_MAILSPIKE_GOOD(-0.10)[209.85.218.45:from]; MLMMJ_DEST(0.00)[freebsd-current@freebsd.org,freebsd-hackers@freebsd.org]; R_DKIM_NA(0.00)[]; ARC_NA(0.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; MIME_TRACE(0.00)[0:+]; FROM_NEQ_ENVFROM(0.00)[emaste@freebsd.org,carpeddiem@gmail.com]; RCVD_IN_DNSWL_NONE(0.00)[209.85.218.45:from]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_SOME(0.00)[]; FROM_HAS_DN(0.00)[]; FREEFALL_USER(0.00)[carpeddiem]; FREEMAIL_ENVFROM(0.00)[gmail.com]; RCPT_COUNT_THREE(0.00)[4]; DMARC_NA(0.00)[freebsd.org]; RCVD_TLS_LAST(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-ThisMailContainsUnwantedMimeParts: N On Fri, 29 Jul 2022 at 03:52, Xin Li wrote: > But for applications that really want to have smaller footprint, bzip2 > might be a better alternative -- the binary is bigger than minigzip, but > library was smaller than zlib so the total size is actually a little bit > smaller: ... For applications where tens of kilobytes is a real concern, something like Rob Landley's "toybox" is probably a better bet. I configured it to include only gzip and get: $ ls -l toybox -r-xr-xr-x 1 emaste emaste 36880 Jul 29 11:59 toybox $ ./toybox gzip $ $ ldd ./toybox ./toybox: libc.so.7 => /lib/libc.so.7 (0x822a42000) so it's about 25K larger than minigzip, but doesn't depend on libz and could result in a rather smaller image. Toybox is at https://landley.net/toybox/