nx842_pseries_compress(9)
π nx842_pseries_compress(9) β Kernel API Manual, but make it make sense
okay so bestie, welcome to the Kernel API Manual entry for nx842_pseries_compress β¨ this is the little function that squeezes your data down using the 842 algorithm, and honestly? she's iconic for it π
β¨ NAME β¨
nx842_pseries_compress β compress data using the 842 algorithm ποΈπ
πΈ SYNOPSIS πΈ
int nx842_pseries_compress (const unsigned char *in , unsigned int inlen
, unsigned char *out , unsigned int *outlen , void *wmem );
like, look at her. five arguments, one int coming back at you. slay π
π¦ ARGUMENTS π¦
inβ pointer to the input buffer πΈ this is the stuff you're about to squishinlenβ length of the input buffer, i.e. how much stuff there is πoutβ pointer to the output buffer, where the squeezed result goes πoutlenβ length of the output buffer (and yeah, she gets updated on the way out, keep reading π)wmemβ ptr to a buffer for working memory, and its size is determined bynx842_pseries_driver.workmem_sizeπ§ β¨ don't just make one up, check that field
π₯ DESCRIPTION π₯
so the compression here is provided by the NX842 coprocessor on IBM Power systems π like, actual hardware doing the work, not your sad little CPU. the input buffer gets compressed and the result is stored in the provided output buffer. that's the whole vibe π«
upon return from this function, outlen contains the length of the compressed data π¬ β so yes, she rewrites that variable, that's on purpose, that's the whole point.
β οΈ but if there's an error?outlenwill be 0, and the error will be specified by the return code from this function π so fr fr, check your return code, bestie. don't be out here reading staleoutlenvalues and acting surprised.
π RETURN π
okay so the return values, let's do a vibe check on each one:
0β success π output of lengthoutlenis stored in the buffer atout. go off queen.-ENOMEMβ unable to allocate internal buffers π out of memory, not it-ENOSPCβ output buffer is to small π there's literally no space left, she tried-EIOβ internal error π something went weird inside-ENODEVβ hardware unavailable π« the coprocessor isn't there, so likeβ¦ nothing to do
π SEE ALSO π
go read these next, iykwim π
- Kernel file
./drivers/crypto/nx/nx-common-pseries.cπ nx842_pseries_decompress(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)π
π«Ά that's the whole page, no cap. from./drivers/crypto/nx, dated October 2026 β and this has been your girlnx842_pseries_compress(9), signing off. periodt. π β¨
π¦ 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