I am saving blob in cassandra by converting a text into a compressed blob using erlang function 'term_to_binary'. https://www.erlang.org/doc/man/erlang.html#term_to_binary-2
Is there a way to decode the above compressed blob to original text using a cqlsh query?
You can convert the blob back to an Erlang term with
binary_to_term, but it cannot be done incqlsh, it has to be done in Erlang/Elixir on the application level.If you want to read from the database using a language which doesn't have
binary_to_term, then you might be interested in BERT which is almost 100% compatible with Erlang Term Format and has libraries for Javascript and Ruby.Alternatively, any other serialisation format like Piqi, JSON, XML etc would work.