erlang

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

erlang

Roberto Ostinelli-5
All,
What is the proper way to set a custom compression of term_to_binary/2 in a specific send operation, so that I can use it only when I'm sending a larger message (~80MB)?

Is this how I should do it, compressing and sending the compressed bytes explicitly?

Bin = term_to_binary(Term, [{compressed, 9}]),
my_proc ! Bin

Thanks,
r.
Reply | Threaded
Open this post in threaded view
|

Re: erlang

Kenneth Lundin
Yes , that is the way to do it. You have to create a binary with compressed Erlang External Format first and then send it.

/Kenneth
Reply | Threaded
Open this post in threaded view
|

Re: erlang

Roberto Ostinelli-5
Ok, I will do that. Thank you Kenneth,
r.

On Fri, Jan 17, 2020 at 12:31 PM Kenneth Lundin <[hidden email]> wrote:
Yes , that is the way to do it. You have to create a binary with compressed Erlang External Format first and then send it.

/Kenneth