Text String -> Compress -> RAW binary Blob
I was reading about JSZip that seems quite comprehensive, but, it seems the output is always a ZIP file ( including the folder/files envelope ) where what I needed is the RAW binary blob for the iput string ( not associated to any file name ).
Is there any way to achieve that using Client Side JavaScript ? ( using JSZip or others )
Use zlib. zlib.Deflate
will compress the data to a zlib stream. A zlib stream is the deflate compressed data with a two-byte header and a four-byte integrity check trailer. Six bytes is a tiny amount for the assurance of an integrity check, but if you want to even get rid of those, then you can use zlib.DeflateRaw
.