I have a string for example: "10001000101010001" in PHP I am compressing it with gzcompress, but it compresses ASCII equivalent. I would like to compress the string as if it were binary data not it ASCII binary equivalent.
Bascially I have 2 problems:
- how to convert a list of 1s and 0s into binary
- compress the resulting binary with gzcompress
thanks in advance.