bzip-signature-0.1.2.0: src/BZip/Lens.hs
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 = iso decompress compress
-- TODO: I wonder if this is sufficiently lazy?