module BZip.Lens ( bz2 ) where import BZip import Control.Lens.Iso (Iso', iso) import qualified Data.ByteString.Lazy as BSL -- | @'Control.Lens.view' 'bz2' = 'decompress'@ -- -- @'Control.Lens.view' ('Control.Lens.from' 'bz2') = 'compress'@ -- -- @'Control.Lens.over' 'bz2' f = 'compress' . f . 'decompress'@ -- -- @since 0.1.2.0 bz2 :: Iso' BSL.ByteString BSL.ByteString bz2 :: p ByteString (f ByteString) -> p ByteString (f ByteString) bz2 = (ByteString -> ByteString) -> (ByteString -> ByteString) -> Iso ByteString ByteString ByteString ByteString forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b iso ByteString -> ByteString decompress ByteString -> ByteString compress -- TODO: I wonder if this is sufficiently lazy?