Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1571184 > unrolled thread

Re: [PATCH v6 1/5] lib: Update LZ4 compressor module

Started byJonathan Corbet <corbet@lwn.net>
First post2017-01-31 23:30 +0100
Last post2017-02-01 21:20 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH v6 1/5] lib: Update LZ4 compressor module Jonathan Corbet <corbet@lwn.net> - 2017-01-31 23:30 +0100
    Re: [PATCH v6 1/5] lib: Update LZ4 compressor module Sven Schmidt <4sschmid@informatik.uni-hamburg.de> - 2017-02-01 21:20 +0100

#1571184 — Re: [PATCH v6 1/5] lib: Update LZ4 compressor module

FromJonathan Corbet <corbet@lwn.net>
Date2017-01-31 23:30 +0100
SubjectRe: [PATCH v6 1/5] lib: Update LZ4 compressor module
Message-ID<t5P62-6fV-25@gated-at.bofh.it>
On Fri, 27 Jan 2017 23:02:00 +0100
Sven Schmidt <4sschmid@informatik.uni-hamburg.de> wrote:

I have one quick question...

>  /*
> + * LZ4_compress_default()
> + *	Compresses 'sourceSize' bytes from buffer 'source'
> + *	into already allocated 'dest' buffer of size 'maxOutputSize'.
> + *	Compression is guaranteed to succeed if
> + *	'maxOutputSize' >= LZ4_compressBound(inputSize).
> + *	It also runs faster, so it's a recommended setting.
> + *	If the function cannot compress 'source'
> + *	into a more limited 'dest' budget,
> + *	compression stops *immediately*,
> + *	and the function result is zero.
> + *	As a consequence, 'dest' content is not valid.
> + *
> + *	source       : source address of the original data
> + *	dest         : output buffer address
> + *                 of the compressed data
> + *	inputSize    : Max supported value is
> + *                 LZ4_MAX_INPUT_SIZE
> + *	maxOutputSize: full or partial size of buffer 'dest'
> + *                 (which must be already allocated)
> + *	workmem      : address of the working memory.
> + *                 This requires 'workmem' of size LZ4_MEM_COMPRESS.
> + *	return       : the number of bytes written into buffer 'dest'
> + *   (necessarily <= maxOutputSize) or 0 if compression fails
> + */
> +int LZ4_compress_default(const char *source, char *dest, int inputSize,
> +	int maxOutputSize, void *wrkmem);

Is there any chance you could format these as kerneldoc comments?  You're
not too far from it now, and that would allow the LZ4 interface to be
pulled into the documentation.

Thanks,

jon

[toc] | [next] | [standalone]


#1571956

FromSven Schmidt <4sschmid@informatik.uni-hamburg.de>
Date2017-02-01 21:20 +0100
Message-ID<t69xR-2ab-15@gated-at.bofh.it>
In reply to#1571184
On Tue, Jan 31, 2017 at 03:27:44PM -0700, Jonathan Corbet wrote:
> On Fri, 27 Jan 2017 23:02:00 +0100
> Sven Schmidt <4sschmid@informatik.uni-hamburg.de> wrote:
> 
> I have one quick question...
> 
> >  /*
> > + * LZ4_compress_default()
> > + *	Compresses 'sourceSize' bytes from buffer 'source'
> > + *	into already allocated 'dest' buffer of size 'maxOutputSize'.
> > + *	Compression is guaranteed to succeed if
> > + *	'maxOutputSize' >= LZ4_compressBound(inputSize).
> > + *	It also runs faster, so it's a recommended setting.
> > + *	If the function cannot compress 'source'
> > + *	into a more limited 'dest' budget,
> > + *	compression stops *immediately*,
> > + *	and the function result is zero.
> > + *	As a consequence, 'dest' content is not valid.
> > + *
> > + *	source       : source address of the original data
> > + *	dest         : output buffer address
> > + *                 of the compressed data
> > + *	inputSize    : Max supported value is
> > + *                 LZ4_MAX_INPUT_SIZE
> > + *	maxOutputSize: full or partial size of buffer 'dest'
> > + *                 (which must be already allocated)
> > + *	workmem      : address of the working memory.
> > + *                 This requires 'workmem' of size LZ4_MEM_COMPRESS.
> > + *	return       : the number of bytes written into buffer 'dest'
> > + *   (necessarily <= maxOutputSize) or 0 if compression fails
> > + */
> > +int LZ4_compress_default(const char *source, char *dest, int inputSize,
> > +	int maxOutputSize, void *wrkmem);
> 
> Is there any chance you could format these as kerneldoc comments?  You're
> not too far from it now, and that would allow the LZ4 interface to be
> pulled into the documentation.
> 
> Thanks,
> 
> jon

Hi Jon,

of course, that makes sense. I already checked the documentation and you're right, I'm not that far from it.
Will do the necessary changes.

Thanks,

Sven

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web