Hi Herbert, On Thu, 2023-05-25 at 08:37 +0800, Herbert Xu wrote: > On Wed, May 24, 2023 at 10:58:54AM -0500, Tom Zanussi wrote: > > > > Yes, I think you're right. The reason we did it this way was that > > we're expecting to add more modes, such as 'dynamic' and/or > > 'canned- > > dynamic' etc. > > > > But I don't see a reason we couldn't just register them all and > > have > > the user choose using the algorithm names, especially if that's the > > way > > crypto users expect things to work. > > Are these modes compatible with the deflate algorithm, that is, > can the generic deflate uncompress the output of these modes and > vice versa, can these modes uncompress the output of the generic > algorithm? > > If they're all compatible, then you should just use the "deflate" > algorithm name and use different driver names to differentiate them. > But if they're not compatible then the modes should have distinct > algorithm names. Canned mode is not compatible with generic deflate. Fixed mode is, but due to history-window limitations in the hardware, only for buffers <= 4k, or that have been compressed using a <= 4k history window. So it sounds like we need to use distinct algorithm names, which I'll add in the next version. Thanks, Tom > > Cheers,