crypto_alloc_acomp(9)
π crypto_alloc_acomp(9) π
okay bestie, welcome to the Kernel API Manual β this is the page for crypto_alloc_acomp, and it's literally about getting you a compression handle. let's go π
β¨ NAME β¨
crypto_alloc_acomp β allocate ACOMPRESS tfm handle π¦
β¨ SYNOPSIS β¨
struct crypto_acomp * crypto_alloc_acomp (const char *alg_name , u32 type , u32 mask );
like, that's the whole call. one function, three args, no cap.
β¨ ARGUMENTS β¨
alg_nameβ this is thecra_name/ name or thecra_driver_name/ driver name of the compression algorithm, e.g."deflate". basically you're telling the kernel which algorithm you want πtypeβ specifies the type of the algorithm. yes queen, the type.maskβ specifies the mask for the algorithm. and the mask. they're a lil duo π
β¨ DESCRIPTION β¨
So what does it actually do? It allocates a handle for a compression algorithm π₯
The returned struct crypto_acomp is the handle β and it's required for any subsequent API invocation for the compression operations. so like, no handle = no compression, that's just the vibe check β¨
β¨ RETURN β¨
- On success? you get the allocated handle ππ
- On error?
IS_ERRis true, andPTR_ERRreturns the error code. so check your errors, bestie, don't be out here dereferencing a bad pointer ππ
π SEE ALSO π
okay this list is long, but every single one of these is iconic in its own right:
- Kernel file
./include/crypto/acompress.h struct acomp_req(9)struct crypto_acomp(9)Asynchronous Compression API(9)crypto_alloc_acomp_node(9)crypto_free_acomp(9)acomp_request_alloc_extra(9)acomp_request_alloc_extra(9)β yes, it's listed twice in the original. not me questioning it, iykyk πacomp_request_free(9)acomp_request_set_callback(9)acomp_request_set_params(9)acomp_request_set_src_sg(9)acomp_request_set_src_dma(9)acomp_request_set_src_nondma(9)acomp_request_set_src_folio(9)acomp_request_set_dst_sg(9)acomp_request_set_dst_dma(9)acomp_request_set_dst_nondma(9)acomp_request_set_dst_folio(9)crypto_acomp_compress(9)crypto_acomp_decompress(9)
go read them. all of them. main character reading list fr fr πβ¨
and that's the page! this lil beauty lives in ./include/crypto, and it's dated October 2026 β so yeah, she's from the future π« slay, and remember: allocate responsibly π«Άπ
π¦ 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