compress(1) on Solnix vs Linux and the BSDs

On Solnix, compress is the illumos compress at /usr/bin/compress. The same page also documents uncompress and zcat. It adds -/ for extended system attributes, and has no -d. OpenBSD's compress can also write gzip-style output, with -g and -1 to -9. The other options in common (-b, -c, -f, -v) behave much the same.

What Solnix runs

A default Solnix system runs the illumos compress at /usr/bin/compress. No other variants are shipped. The page is published in pkgs.solnix.illumos-world-man. It covers compress, uncompress and zcat, and the bundle lists no separate zcat page.

Differences

Compared withTopicWhat differs
FreeBSD, OpenBSD, NetBSD-/ extended system attributesSolnix has -/, which copies extended system attributes to the output file. If any cannot be copied, the original file is kept and the exit status is non-zero. The FreeBSD, OpenBSD and NetBSD pages have no such option.
Source: Solnix compress(1) SYNOPSIS and -/; FreeBSD, OpenBSD and NetBSD compress(1) SYNOPSIS
OpenBSD, NetBSD-d to decompressOpenBSD and NetBSD accept -d to decompress, as a flag on compress or uncompress. The Solnix and FreeBSD synopses have no -d. Use uncompress or zcat there.
Source: OpenBSD compress(1) -d; NetBSD compress(1) SYNOPSIS, -d; Solnix compress(1) SYNOPSIS; FreeBSD compress(1) SYNOPSIS
OpenBSDdeflate mode and extra optionsOpenBSD compress has -g and -1 to -9, which use the deflate scheme (gzip mode). Its uncompress restores gzip and zip files too. It also has -S, -o, -r, -t, -l, -N, -n and -q. The Solnix uncompress is documented for files produced by compress, and the page has none of these options.
Source: OpenBSD compress(1) SYNOPSIS, -1...9, -g, -S, -o, -r, -t, -l, -q and DESCRIPTION; Solnix compress(1) DESCRIPTION (uncompress), OPTIONS
FreeBSD-v with -c, and -v on uncompressOn FreeBSD, -v is ignored by uncompress and when -c is given. Solnix lists -v for compress -c and for uncompress, and it writes the percentage reduction or expansion to standard error.
Source: FreeBSD compress(1) -c, -v; Solnix compress(1) SYNOPSIS, -v
FreeBSD, OpenBSD, NetBSDoverwrite prompt when stdin is not a terminalOn Solnix, without -f and when stdin is not a terminal, compress writes a diagnostic to standard error and exits with a status above 0. The BSD pages say that if prompting is not possible, files are not overwritten, and they give no exit status for this case.
Source: Solnix compress(1) -f; FreeBSD, OpenBSD and NetBSD compress(1) DESCRIPTION (prompt paragraph)
NetBSDexit status 2Solnix and FreeBSD compress exit 2 when a file would not shrink and -f was not given. The NetBSD page documents only 0 on success and >0 on error.
Source: Solnix compress(1) EXIT STATUS; FreeBSD compress(1) EXIT STATUS; NetBSD compress(1) EXIT STATUS
FreeBSD, NetBSDzcatThe Solnix page documents zcat as a third command, equal to uncompress -c, and it takes only file operands. The FreeBSD and NetBSD pages cover only compress and uncompress and point to zcat(1) in SEE ALSO. OpenBSD's zcat also accepts -f, -g, -h, -q and -r.
Source: Solnix compress(1) SYNOPSIS, zcat; FreeBSD compress(1) SEE ALSO; NetBSD compress(1) SEE ALSO; OpenBSD compress(1) SYNOPSIS
FreeBSD, OpenBSD, NetBSDpreserved file attributesSolnix compress keeps ownership, modes, change and modification times, ACLs and extended attributes. The BSD pages list modification and access times, file flags, mode, user ID and group ID, as far as permissions allow.
Source: Solnix compress(1) DESCRIPTION; FreeBSD, OpenBSD and NetBSD compress(1) DESCRIPTION
FreeBSDlinksFreeBSD replaces a soft or hard link with a compressed copy of its target and leaves the target uncompressed. Its BUGS section says there are no link-handling options. The Solnix page does not describe link handling.
Source: FreeBSD compress(1) DESCRIPTION (last paragraph), BUGS; Solnix compress(1) DESCRIPTION

Standards

  • POSIX: compress is a POSIX.1-2024 utility.
  • Solnix: ATTRIBUTES: Interface Stability is Committed, CSI is Enabled, and the Standard row says see standards(7).
  • FreeBSD: The compress and uncompress utilities conform to IEEE Std 1003.1-2001 (“POSIX.1”).
  • NetBSD: The NetBSD page in the bundle has no STANDARDS section.

Writing portable scripts

  • Use only -b, -c, -f and -v, and use uncompress or zcat to decompress. Do not use -d, -g, -q, -t, -/ or -1 to -9, which are missing or different on some systems.
  • Do not rely on -v together with -c or on uncompress -v. FreeBSD ignores -v in both cases.
  • Treat exit status 2 as 'not compressed, no gain' only on Solnix and FreeBSD. NetBSD documents only 0 and >0.

Every difference here is taken from the manual pages linked above: Solnix's published page, Linux (man-pages and the GNU and util-linux manuals), FreeBSD, OpenBSD and NetBSD. Each row names its source. Where a manual is silent, this page is too. Compiled 2026-10-26. Found a mistake? Mail hackers@lists.solnix.io.