nx842_pseries_decompress(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’œ nx842_pseries_decompress β€” the Kernel API Manual, bestie edition πŸ’œ

Okay so this is the nx842_pseries_decompress(9) page from the Kernel API Manual, and honestly? It's giving "tiny function, big job." Let's get into it ✨


🌸 NAME 🌸

nx842_pseries_decompress β€” decompress data using the 842 algorithm. That's it, that's the whole vibe πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

int nx842_pseries_decompress (const unsigned char *in , unsigned int
inlen , unsigned char *out , unsigned int *outlen , void *wmem );

Five arguments, one int coming back at you. No cap, that's the whole signature 🫢


πŸŽ€ ARGUMENTS πŸŽ€

  • in β€” pointer to the input buffer. The squished-up data goes here, bestie.
  • inlen β€” length of the input buffer. Gotta say how much squished data there is.
  • out β€” pointer to the output buffer. This is where the nice fluffy decompressed data lands ✨
  • outlen β€” length of the output buffer. Heads up: this is a pointer, and it gets rewritten β€” more on that below πŸ‘€
  • wmem β€” ptr to buffer for working memory, and the size is determined by nx842_pseries_driver.workmem_size. Don't just vibe-guess the size, check it πŸ’€

🌈 DESCRIPTION 🌈

Decompression provide by the NX842 coprocessor on IBM Power systems πŸ”₯ β€” like, actual hardware doing the work, main character energy fr.

So here's the flow: the input buffer gets decompressed and the result is stored in the provided output buffer. The size allocated to the output buffer is provided by the caller of this function in outlen.

Then here's the cute part 🌸 β€” upon return from this function, outlen contains the length of the decompressed data. It's an in-and-out situation, iykyk.

⚠️ But if there is an error? outlen will be 0, and an error will be specified by the return code from this function. So like, don't trust the number, check the return code first. Periodt.

⭐ RETURN ⭐

  • 0 β€” Success, output of length outlen stored in the buffer at out πŸ‘‘
  • -ENODEV β€” Hardware decompression device is unavailable 😭
  • -ENOMEM β€” Unable to allocate internal buffers πŸ’€
  • -ENOSPC β€” Output buffer is to small πŸ™ˆ (your buffer, not the vibes)
  • -EINVAL β€” Bad input data encountered when attempting decompress 🫠
  • -EIO β€” Internal error 🧚

πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./drivers/crypto/nx/nx-common-pseries.c β€” go read the source, bestie, it's right there πŸ“–


Okay that's the whole page πŸŽ€ Big slay to the NX842 coprocessor, big slay to you for reading all the way down. This little gem lives in ./drivers/crypto/nx, and the manual itself is dated October 2026 β€” so yeah, future vibes only πŸŒˆπŸ’– go decompress something iconic ✨

πŸ“¦ where this page comes from