How would you reverse your compression? You'd need to mark how many 0s you deleted somehow, which would probably take up just as much space, or more, as you saved.
I think most compression algorithms find patterns in the bytes/bits of the data and try to represent patterns using less space. You could encode part of a picture as 14*red instead of red,red,red,red...
Bitwise operators are generally used for high performance code, encryption and very low level programming.
For example, var<<1 performs better for most processors than 2*var. (Although I think most compilers will turn a multiplication by a power of two into left shifts anyway, so this optimization is pretty much implicit)
In encryption, many algorithms use the xor and shift operations. (Haha, don't know too much about encryption algorithms.)
For low level programmers, it can once again be used for optimizations, ie.
|
xor var, var; //Sets var to zero, usually faster than an assignment
|
Bitwise ops are also used to manipulate very dense blocks of data, where different bits in a single byte could represent different states.
EDIT: I probably missed some bitwise uses, if anyone wants to add on :P
EDIT2: Just saw L B's and your reply. Yeah, you'd probably make the file a little bigger actually, because you'd have to store not only the number of 0s, but also where they go.