libcompression ?

Was going to work with compression_encode_buffer , but when I link I get


Undefined symbols for architecture armv7:

"_compression_decode_buffer", referenced from:


Sure, right let's add the library but all I can find is a file

libcompression.tbd

but that appears to be a text file that just contains the following text.

So anyone know how to get around the link error?

---

archs: [ armv7, armv7s, armv7k, arm64 ]

platform: ios

install-name: /usr/lib/libcompression.dylib

exports:

- archs: [ armv7, armv7s, armv7k, arm64 ]

symbols: [ _compression_decode_buffer, _compression_decode_scratch_buffer_size,

_compression_encode_buffer, _compression_encode_scratch_buffer_size,

_compression_stream_build_shared_dict, _compression_stream_destroy,

_compression_stream_get_state_size, _compression_stream_identify_algorithm,

_compression_stream_init, _compression_stream_init_with_options,

_compression_stream_is_state_valid, _compression_stream_op_data_size,

_compression_stream_process ]

...

Accepted Answer

From what we can see, the linker accepts the TBD file as effectively a list of symbols to presume are defined in order to allow compilation - if you add that file to the linked frameworks of your project, it will no longer generate errors for the missing symbols.

edit: removed conjecture due to issues we were also having. Just link to the TBD file and it should work.

With current xCode this worked, however the compression_decode_buffer returns zero, whereas the original call to zlib returns data. I guess now we will take the orignal data, run it thru libcompress and see if compression_decode_buffer uncompresses it and try to understand what is broken.

libcompression ?
 
 
Q