diff --git a/src/Data/ByteString/ToolsYj.hs b/src/Data/ByteString/ToolsYj.hs
--- a/src/Data/ByteString/ToolsYj.hs
+++ b/src/Data/ByteString/ToolsYj.hs
@@ -5,8 +5,10 @@
 
 module Data.ByteString.ToolsYj (
 
-	fromBits, fromBits', toBits, toBits'
+	fromBits, fromBits', toBits, toBits',
 
+	toBitsBE
+
 	) where
 
 import Data.Bits
@@ -32,3 +34,6 @@
 	Nothing
 	(Just $ BS.foldr (\b s -> bitsToBits 8 b .|. s `shiftL` 8) zeroBits bs)
 	(8 * BS.length bs <= finiteBitSize @b undefined)
+
+toBitsBE :: Bits b => BS.ByteString -> b
+toBitsBE = BS.foldl (\s b -> bitsToBits 8 b .|. s `shiftL` 8) zeroBits
diff --git a/tools-yj.cabal b/tools-yj.cabal
--- a/tools-yj.cabal
+++ b/tools-yj.cabal
@@ -5,7 +5,7 @@
 -- see: https://github.com/sol/hpack
 
 name:           tools-yj
-version:        0.1.0.26
+version:        0.1.0.27
 synopsis:       Tribial tools
 description:    Please see the README on GitHub at <https://github.com/YoshikuniJujo/tools-yj#readme>
 category:       Tools
