Write and read a 1 bpp image using OpenCV / C++

How can I write (from 8bpp data), save it, and read (from file) a 1bpp image using OpenCV?

I’ve searched for it, there are some incomplete SO forum threads. I haven’t found a good solution to this.

can you explain, what you need this for ?

( opencv does not have any provision to save bits, the smallest unit here is a uchar (8 bits, a single grayscale pixel) )