Closed GoogleCodeExporter closed 9 years ago
LZ4_uncompress is also missing
Original comment by yuriv...@gmail.com
on 6 Feb 2014 at 11:45
ok.
> With shared library, it should be possible to do all operations without the
need to include headers.
Just for my information, I'm surprised a compilation using LZ4 compression
function wouldn't require a *.h. Prototype must be defined somewhere.
This prototype definition is a requirement, why not using lz4.h for this ?
Original comment by yann.col...@gmail.com
on 7 Feb 2014 at 1:37
You shouldn't assume that the calling code is always C/C++. There are other
languages around, including proprietary ones.
One standard way to bind to the C-library is to always have C layer with .h
files, etc.
However, if the interface is very simple, one can just load the library and use
the symbols (dlopen/dlsym). dlsym gets symbol by name. And if all logic is in
the shared library and the interface is simple, it can just call it. It can
provide buffers, sizes, etc. But when you have significant logic in .h, this
pretty much cuts down such simple users, and forces everybody to have a C
binding layer.
Now, interface-wise, lz4 doesn't have to be complex at all. So the fact that
LZ4_compressBound and LZ4_uncompress are in .h just unnecessarily
overcomplicates interface, hurting some potential users binding to it. It
forces everybody to have C layer, when there is really no need for it.
You can take zlib.h (from http://www.zlib.net) as a reference. The header
strictly defines the interface without any inline functions or complex macros.
Original comment by yuriv...@gmail.com
on 7 Feb 2014 at 8:52
The following package
is a wip r114
which attempts to implement the requested changes.
Original comment by yann.col...@gmail.com
on 27 Feb 2014 at 11:05
Attachments:
Original comment by yann.col...@gmail.com
on 27 Feb 2014 at 11:05
Fixed into r114
Original comment by yann.col...@gmail.com
on 12 Mar 2014 at 2:57
Original issue reported on code.google.com by
yuriv...@gmail.com
on 6 Feb 2014 at 11:01