Hello!

On 2021-04-12 James Fennell wrote:
> Over the last couple of weeks I've been working on a project to add
> Go bindings for the xz format: https://github.com/jamespfennell/xz

:-)

> The project uses the Go technology cgo to compile the relevant
> liblzma C files automatically and link them in with the Go binary.

That made me wonder about config.h and the #defines. With a really
quick look I found

    https://github.com/jamespfennell/xz/blob/main/lzma/lzma.go

which sets a few #defines but it's quite limited, for example, a
comment tells that only 64-bit systems are supported. I also don't see
TUKLIB_FAST_UNALIGNED_ACCESS which is good on 32/64-bit x86 and some
ARMs to get a little better encoder performance. Also

    #define TUKLIB_SYMBOL_PREFIX lzma_

could be good to have to ensure that all symbols begin with "lzma_".

Of course these don't matter if the system liblzma is used instead. I
understood that it's an option too.

> Lasse, would you be interested in adding a link under the bindings
> section of the xz website?

I can. Since there are other bindings to use liblzma, I wonder if some
of those should be listed too. What do you think? I have no Go
experience so I have no idea which are good or already popular.

Thanks!

-- 
Lasse Collin  |  IRC: Larhzu @ IRCnet & Freenode

Reply via email to