PLSCOMPRESSION(3plplot)

πŸ’… PLSCOMPRESSION β€” like, the whole vibe check on device compression πŸŽ€

okay so bestie, welcome to plscompression from the PLplot API ✨ this is the little cutie that sets your device-compression level, and honestly? she's lowkey iconic for such a tiny function. let's get into it 🫢


✨ SYNOPSIS ✨

plscompression(compression)

that's it. one argument. one call. main character energy πŸ‘‘


🌸 DESCRIPTION 🌸

so what does she actually do? she sets the device-compression level πŸ’– that's the whole job. no cap.

but listen β€” this only hits different for drivers that actually provide compression. if your driver doesn't do compression, she's basically texting into the void, iykyk πŸ™ˆ

⚠️ timing matters, bestie: this function, if used, should be invoked before a call to plinit(3plplot) β€” like, before the glow-up, not after. periodt.

Redacted form: plscompression(compression)

she also makes a lil cameo β€” this function is used in example 31 ⭐ go look, it's giving tutorial-chic.


πŸ¦‹ ARGUMENTS πŸ¦‹

  • compression (PLINT(3plplot), input) β€” the desired compression level, bestie. this is a device-dependent value, so don't come for me if it varies β€” that's just how she is πŸ’…

so here's the tea on who actually uses it: currently only the jpeg and png devices use these values πŸ‘‘

  • πŸ“ for jpeg, the value is the jpeg quality, which should normally be in the range 0-95. higher values denote higher quality and hence larger image sizes. yeah β€” prettier pic, chunkier file. tradeoffs, babe 😭
  • 🌈 for png, values are in the range -1 to 99:
    • values of 0-9 are taken as the compression level for zlib
    • a value of -1 denotes the default zlib compression level
    • values in the range 10-99 are divided by 10 and then used as the zlib compression level
  • πŸ’€ and just so we're clear: higher compression levels correspond to greater compression and small file sizes at the expense of more computation. so yes, your files get smol but your CPU starts sweating. that's the deal, ngl.

🧚 AUTHORS 🧚

Many developers (who are credited at http://plplot.sourceforge.net/credits.php) have contributed to PLplot over its long history 🫢 absolute legends, every single one. we stan a long-running open-source glow-up πŸ’œ


πŸ‘‘ SEE ALSO πŸ‘‘

PLplot documentation at http://plplot.sourceforge.net/documentation.php.

like, go read it. it's giving lore. πŸ“šβœ¨


k bye bestie, go compress some pixels responsibly!! πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈπŸ’…

signing off from the PLplot API, August, 2026 edition β€” PLSCOMPRESSION(3plplot), muah πŸ’‹

πŸ“¦ where this page comes from