nx842_pseries_decompress(9)
π 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 bynx842_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?outlenwill be0, 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 lengthoutlenstored in the buffer atoutπ-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 π
nx842_pseries_compress(9)nx842_OF_set_defaults(9)nx842_OF_upd_status(9)nx842_OF_upd_maxsglen(9)nx842_OF_upd_maxsyncop(9)nx842_OF_upd(9)nx842_OF_notifier(9)
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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms