bytestring
Fast, compact, strict and lazy byte strings with a list interface
An efficient compact, immutable byte string type (both strict and lazy)
suitable for binary or 8-bit character data.
The 'ByteString' type represents sequences of bytes or 8-bit characters.
It is suitable for high performance use, both in terms of large data
quantities, or high speed requirements. The 'ByteString' functions follow
the same style as Haskell\'s ordinary lists, so it is easy to convert code
from using 'String' to 'ByteString'.
Two 'ByteString' variants are provided:
* Strict 'ByteString's keep the string as a single large array. This
makes them convenient for passing data between C and Haskell.
* Lazy 'ByteString's use a lazy list of strict chunks which makes it
suitable for I\/O streaming tasks.
The @Char8@ modules provide a character-based view of the same
underlying 'ByteString' types. This makes it convenient to handle mixed
binary and 8-bit character content (which is common in many file formats
and network protocols).
The 'Builder' module provides an efficient way to build up 'ByteString's
in an ad-hoc way by repeated concatenation. This is ideal for fast
serialisation or pretty printing.
There is also a 'ShortByteString' type which has a lower memory overhead
and can be converted to or from a 'ByteString'. It is suitable for keeping
many short strings in memory, especially long-term, without incurring any
possible heap fragmentation costs.
'ByteString's are not designed for Unicode. For Unicode strings you should
use the 'Text' type from the @text@ package.
These modules are intended to be imported qualified, to avoid name clashes
with "Prelude" functions, e.g.
> import qualified Data.ByteString as BS
| version | uploaded | uploader | changes | |
|---|---|---|---|---|
| 0.12.2.0 | 2024-12-06 21:41 UTC | Bodigrim | 1 revisions | +538/−437 lines, 44 filesdep ~QuickCheckdep ~basePVP ok |
| 0.12.1.0 | 2024-02-16 03:27 UTC | clyring | 1 revisions | +3398/−1642 lines, 37 filesdep +sybdep ~basePVP: major bump suggested |
| 0.12.0.2 | 2023-08-16 01:53 UTC | clyring | +16/−2 lines, 3 files | |
| 0.12.0.1 | 2023-08-05 00:03 UTC | clyring | +47/−9 lines, 3 files | |
| 0.12.0.0 | 2023-07-07 01:45 UTC | clyring | +1459/−520 lines, 21 filesdep +data-array-bytePVP ok | |
| 0.11.5.4 | 2025-01-01 15:26 UTC | Bodigrim | +12/−5 lines, 3 filesPVP ok | |
| 0.11.5.3 | 2023-11-15 02:19 UTC | clyring | +96/−62 lines, 5 filesPVP ok | |
| 0.11.5.2 | 2023-08-16 01:53 UTC | clyring | +9/−2 lines, 3 files | |
| 0.11.5.1 | 2023-08-05 00:03 UTC | clyring | +40/−9 lines, 3 files | |
| 0.11.5.0 | 2023-07-07 01:45 UTC | clyring | +420/−216 lines, 18 filesdep ~basedep ~deepseqdep ~ghc-primPVP: major bump suggested | |
| 0.11.4.0 | 2023-01-12 20:00 UTC | clyring | 1 revisions | +1519/−1192 lines, 20 filesdep ~tasty-quickchecknew-uploaderPVP: major bump suggested |
| 0.11.3.1 | 2022-05-04 19:55 UTC | Bodigrim | 1 revisions | +45/−38 lines, 13 filesPVP ok |
| 0.11.3.0 | 2022-02-28 22:16 UTC | Bodigrim | 1 revisions | +2483/−751 lines, 22 filesPVP: major bump suggested |
| 0.11.2.0 | 2021-12-08 20:39 UTC | Bodigrim | 1 revisions | +7182/−4120 lines, 49 filesdep +QuickCheckdep +template-haskelldep −dlistdep −ghc-bignumdep −ghc-byteorderdep ~basedep ~deepseqdep ~ghc-primPVP: major bump suggested |
| 0.11.1.0 | 2021-02-14 22:46 UTC | Bodigrim | 1 revisions | +5994/−635 lines, 33 filesdep +bytestringdep +dlistdep +ghc-byteorderdep ~basedep ~deepseqdep ~ghc-primPVP: major bump suggested |
| 0.11.0.0 | 2020-09-23 23:15 UTC | Bodigrim | 1 revisions | +1167/−710 lines, 21 filesdep ~basePVP ok |
| 0.10.12.1 | 2021-01-06 01:16 UTC | Bodigrim | 1 revisions | +70/−55 lines, 6 filesdep ~basePVP: minor bump suggested |
| 0.10.12.0 | 2020-08-06 07:09 UTC | sjakobi | 1 revisions | +301/−4232 lines, 29 filesdep −HUnitdep −QuickCheckdep −byteorderdep ~basePVP ok |
| 0.10.10.1 | 2020-07-01 21:58 UTC | sjakobi | 1 revisions | +179/−57 lines, 13 filesdep +ghc-bignumdep ~QuickChecknew-uploaderPVP ok |
| 0.10.10.0 | 2019-07-13 16:10 UTC | DuncanCoutts | 1 revisions | +5/−2 lines, 2 filesdep ~basePVP ok |
| 0.10.9.0 | 2020-09-26 12:13 UTC | Bodigrim | 1 revisions | +343/−177 lines, 18 filesdep ~QuickCheckdep ~basenew-uploaderPVP: major bump suggested |
| 0.10.8.2 | 2017-07-25 06:02 UTC | HerbertValerioRiedel | 1 revisions | +223/−165 lines, 13 filesdep ~dlistnew-uploaderPVP: minor bump suggested |
| 0.10.8.1 | 2016-05-15 21:02 UTC | DuncanCoutts | 1 revisions | +14/−7 lines, 5 filesdep ~basePVP: major bump suggested |
| 0.10.8.0 | 2016-05-03 22:41 UTC | DuncanCoutts | 2 revisions | +398/−462 lines, 16 filesdep ~QuickCheckdep ~basedep ~dlistPVP ok |
| 0.10.6.0 | 2015-03-23 11:08 UTC | DuncanCoutts | 1 revisions | +311/−816 lines, 22 filesdep ~basedep ~deepseqPVP: major bump suggested |
| 0.10.4.1 | 2014-11-09 23:44 UTC | DuncanCoutts | 2 revisions | +184/−261 lines, 15 filesdep +HUnitdep +test-frameworkdep +test-framework-hunitdep ~QuickCheckdep ~basedep ~deepseq |
| 0.10.4.0 | 2013-10-08 08:27 UTC | DuncanCoutts | 3 revisions | +1843/−2263 lines, 33 filesdep +integerdep +integer-gmpdep −criteriondep ~basedep ~deepseqdep ~directory |
| 0.10.2.0 | 2012-09-20 09:21 UTC | DuncanCoutts | 2 revisions | +6429/−6110 lines, 41 filesdep ~directoryPVP: major bump suggested |
| 0.10.0.2 | 2013-02-18 00:21 UTC | DuncanCoutts | 2 revisions | +37/−23 lines, 7 filesdep ~directoryPVP ok |
| 0.10.0.1 | 2012-09-20 09:20 UTC | DuncanCoutts | 2 revisions | +1648/−59 lines, 10 filesdep +randomdep ~QuickCheckdep ~basedep ~deepseq |
| 0.10.0.0 | 2012-09-20 09:20 UTC | DuncanCoutts | 3 revisions | +8373/−2778 lines, 28 filesdep +QuickCheckdep +byteorderdep +criteriondep ~base |
| 0.9.2.1 | 2012-02-03 00:25 UTC | IanLynagh | 1 revisions | +17/−2 lines, 7 filesdep ~basePVP ok |
| 0.9.2.0 | 2011-08-25 12:28 UTC | IanLynagh | 1 revisions | +2482/−60 lines, 8 filesdep ~basePVP ok |
| 0.9.1.10 | 2011-03-03 15:08 UTC | IanLynagh | 1 revisions | +2/−1 lines, 2 filesPVP ok |
| 0.9.1.9 | 2011-01-06 17:12 UTC | DuncanCoutts | 1 revisions | +16/−7 lines, 4 filesPVP ok |
| 0.9.1.8 | 2010-11-17 14:04 UTC | IanLynagh | 1 revisions | +45/−11 lines, 4 filesPVP: minor bump suggested |
| 0.9.1.7 | 2010-06-15 14:06 UTC | IanLynagh | 1 revisions | +10/−8 lines, 3 filesnew-uploaderPVP ok |
| 0.9.1.6 | 2010-03-31 10:38 UTC | DuncanCoutts | 1 revisions | +12/−16 lines, 4 filesPVP ok |
| 0.9.1.5 | 2009-10-04 16:12 UTC | DuncanCoutts | 1 revisions | +212/−85745 lines, 50 filesdep ~basesetup-changed |
| 0.9.1.4 | 2008-11-09 20:28 UTC | DonaldStewart | 1 revisions | +75/−38 lines, 9 filesdep −sybdep ~base |
| 0.9.1.3 | 2008-10-04 23:14 UTC | DonaldStewart | 1 revisions | +13/−12 lines, 2 filesdep +sybdep ~base |
| 0.9.1.2 | 2008-08-25 21:47 UTC | DonaldStewart | 1 revisions | +2/−2 lines, 1 files |
| 0.9.1.1 | 2008-08-25 21:06 UTC | DonaldStewart | 1 revisions | +49/−22 lines, 4 filesdep +ghc-prim |
| 0.9.1.0 | 2008-04-20 21:23 UTC | DonaldStewart | 1 revisions | +1384/−926 lines, 20 filesdep −arraydep ~base |
| 0.9.0.4 | 2008-01-05 05:23 UTC | DonaldStewart | 1 revisions | +48/−3 lines, 3 files |
| 0.9.0.3 | 2007-12-20 07:50 UTC | DonaldStewart | 1 revisions | +137/−102 lines, 6 files |
| 0.9.0.2 | 2007-12-16 23:19 UTC | DonaldStewart | 1 revisions | +85027/−182 lines, 41 filesnew-uploader |
| 0.9.0.1 | 2007-11-03 15:32 UTC | RossPaterson | 1 revisions | +1/−1 lines, 1 filesnew-uploader |
| 0.9 | 2007-10-21 12:02 UTC | DuncanCoutts | 1 revisions | +6732/−0 lines, 13 filesdep +arraydep +basesetup-changed |
Dependencies of bytestring-0.12.2.0
QuickCheck <2.17 2.16.0.0 → 2.19.0.0 newer than bounds
| 2026-09-16 11:18 UTC | 2.19.0.0 newer than bounds | +67/−41 lines, 10 filesdep +OneTuplePVP ok |
| 2026-02-26 12:42 UTC | 2.18.0.0 newer than bounds | +826/−542 lines, 23 filesPVP ok |
| 2025-10-13 12:40 UTC | 2.17.1.0 newer than bounds | +18/−8 lines, 4 filesdep ~randomPVP: major bump suggested |
| 2025-10-07 12:26 UTC | 2.17.0.0 newer than bounds | +667/−129 lines, 14 filesdep +data-array-bytedep +hintdep +splitdep −ghc-primdep −old-localedep −old-timedep ~basedep ~randomdep ~template-haskellPVP ok |
| 2025-06-17 07:53 UTC | 2.16.0.0 | +477/−86 lines, 15 filesdep ~basenew-uploaderPVP ok |
showing 5 of 66 versions
base >=4.18.1 && <5 4.22.0.0 → 4.22.1.0
| 2026-12-01 12:38 UTC | 4.22.1.0 | +388/−6 lines, 9 filesdep ~ghc-internalPVP: major bump suggested |
| 2025-12-19 11:52 UTC | 4.22.0.0 | +886/−215 lines, 28 filesdep ~ghc-internalPVP ok |
| 2026-03-27 12:26 UTC | 4.21.2.0 | +10/−3 lines, 4 filesdep ~ghc-internalPVP ok |
| 2025-12-27 10:31 UTC | 4.21.1.0 | +17/−5 lines, 4 filesdep ~ghc-internalPVP ok |
| 2024-12-16 09:24 UTC | 4.21.0.0 | +1170/−396 lines, 39 filesdep ~ghc-internalPVP ok |
showing 5 of 61 versions
data-array-byte >=0.1 && <0.2 0.1.0.1 → 0.1.0.2
| 2025-12-19 20:01 UTC | 0.1.0.2 | +48/−31 lines, 3 filesdep ~basedep ~deepseqdep ~template-haskell |
| 2022-10-08 12:22 UTC | 0.1.0.1 | +111/−2 lines, 3 filesdep +data-array-bytedep +quickcheck-classes-basedep +tastydep ~basedep ~deepseqdep ~template-haskellPVP ok |
| 2022-10-07 18:38 UTC | 0.1 | +441/−0 lines, 5 filesdep +basedep +deepseqdep +template-haskell |
deepseq >=0 1.5.2.0 → 1.6.0.0
| 2024-09-08 16:18 UTC | 1.6.0.0 | +5/−14 lines, 3 filesdep ~basePVP ok |
| 2025-06-14 22:25 UTC | 1.5.2.0 | +13/−4 lines, 3 filesPVP: major bump suggested |
| 2024-09-09 12:48 UTC | 1.5.1.0 | +69/−14 lines, 3 filesdep −arraydep ~basePVP: major bump suggested |
| 2023-07-27 19:32 UTC | 1.5.0.0 | +619/−532 lines, 5 filesdep ~basePVP ok |
| 2022-12-18 00:14 UTC | 1.4.8.1 | +34/−9 lines, 3 filesdep ~basePVP: major bump suggested |
showing 5 of 26 versions
ghc-prim >=0 0.12.0 → 0.13.0
| 2024-12-16 09:29 UTC | 0.13.0 | +95/−12 lines, 6 filesPVP ok |
| 2025-05-03 11:48 UTC | 0.12.0 | +5108/−1582 lines, 15 filesnew-uploaderPVP ok |
| 2023-10-10 00:24 UTC | 0.11.0 | +770/−234 lines, 9 filesPVP ok |
| 2023-03-28 14:22 UTC | 0.10.0 | +487/−297 lines, 16 filesPVP ok |
| 2022-08-07 20:08 UTC | 0.9.0 | +2921/−2018 lines, 14 filesPVP ok |
showing 5 of 15 versions
random >=0 1.3.0 → 1.3.1
| 2025-04-04 14:25 UTC | 1.3.1 | +15/−6 lines, 3 filesPVP ok |
| 2025-01-06 04:03 UTC | 1.3.0 | +2410/−538 lines, 16 filesdep +data-array-bytedep ~basedep ~transformersPVP ok |
| 2024-12-14 20:31 UTC | 1.2.1.3 | +22/−37 lines, 3 filesdep −doctestdep −mwc-randomdep −unliftiodep ~basedep ~containersdep ~primitivePVP ok |
| 2024-02-04 16:26 UTC | 1.2.1.2 | +17/−12 lines, 2 filesdep ~doctestdep ~tastyPVP: major bump suggested |
| 2022-05-09 02:32 UTC | 1.2.1.1 | +8/−9 lines, 3 filesdep −ghc-byteorderdep ~bytestringdep ~doctestdep ~mtlPVP ok |
showing 5 of 15 versions
syb >=0 0.7.3 → 0.7.4
| 2026-03-07 17:18 UTC | 0.7.4 | +27/−18 lines, 4 filesPVP ok |
| 2025-08-21 20:31 UTC | 0.7.3 | +176/−154 lines, 13 filesdep ~basePVP: major bump suggested |
| 2023-07-30 17:25 UTC | 0.7.2.4 | +434/−64 lines, 7 filesPVP: major bump suggested |
| 2023-03-18 23:19 UTC | 0.7.2.3 | +50/−36 lines, 4 filesdep ~mtlPVP ok |
| 2022-09-17 15:09 UTC | 0.7.2.2 | +108/−79 lines, 36 filesPVP ok |
showing 5 of 33 versions
tasty >=0 1.5.4 → 1.5.5
| 2026-10-20 23:13 UTC | 1.5.5 | +53/−26 lines, 7 filesdep +terminal-sizePVP ok |
| 2026-03-25 20:04 UTC | 1.5.4 | +332/−166 lines, 22 filesdep −semigroupsPVP ok |
| 2025-01-05 19:52 UTC | 1.5.3 | +36/−11 lines, 3 filesdep ~containersdep ~optparse-applicativePVP: major bump suggested |
| 2024-11-03 00:34 UTC | 1.5.2 | +22/−5 lines, 4 filesdep ~basePVP ok |
| 2024-06-22 10:14 UTC | 1.5.1 | +131/−63 lines, 10 filesdep ~basePVP: major bump suggested |
showing 5 of 76 versions
tasty-bench >=0 0.5 → 0.5.1
| 2026-06-09 23:23 UTC | 0.5.1 | +111/−42 lines, 3 filesdep +transformersdep ~tastyPVP ok |
| 2025-12-26 19:44 UTC | 0.5 | +265/−144 lines, 4 filesdep ~basedep ~timePVP ok |
| 2024-12-29 22:30 UTC | 0.4.1 | +48/−75 lines, 4 filesdep −taggeddep ~containersPVP ok |
| 2024-07-06 11:31 UTC | 0.4 | +225/−103 lines, 5 filesdep +timedep ~containersdep ~tastyPVP ok |
| 2023-09-10 00:31 UTC | 0.3.5 | +265/−164 lines, 4 filesdep ~containersdep ~deepseqdep ~ghc-primPVP ok |
showing 5 of 17 versions
tasty-quickcheck >=0.8.1 0.11 → 0.11.1
| 2025-01-05 19:53 UTC | 0.11.1 | +66/−33 lines, 4 filesdep +regex-tdfadep −pcre-lightdep ~QuickCheckdep ~basedep ~optparse-applicativePVP: major bump suggested |
| 2024-06-22 10:14 UTC | 0.11 | +132/−49 lines, 4 filesdep ~QuickCheckPVP ok |
| 2023-09-10 00:10 UTC | 0.10.3 | +52/−14 lines, 3 filesdep ~QuickCheckdep ~optparse-applicativedep ~randomnew-uploaderPVP ok |
| 2021-11-20 19:17 UTC | 0.10.2 | +21/−13 lines, 3 filesdep ~basePVP: major bump suggested |
| 2020-12-18 09:42 UTC | 0.10.1.2 | +27/−13 lines, 4 filesdep ~basePVP: major bump suggested |
showing 5 of 23 versions
template-haskell >=0 2.23.0.0 → 2.24.0.0
| 2025-12-19 11:53 UTC | 2.24.0.0 | +606/−68 lines, 9 filesdep +ghc-internaldep ~basedep ~ghc-boot-thPVP ok |
| 2024-12-16 09:29 UTC | 2.23.0.0 | +104/−5685 lines, 9 filesdep −ghc-primdep −prettydep ~basedep ~ghc-boot-thnew-uploaderPVP ok |
| 2024-05-15 13:07 UTC | 2.22.0.0 | +176/−81 lines, 7 filesdep ~basedep ~ghc-boot-thPVP ok |
| 2023-10-10 00:23 UTC | 2.21.0.0 | +275/−148 lines, 7 filesdep ~basedep ~ghc-boot-thPVP ok |
| 2023-03-28 13:43 UTC | 2.20.0.0 | +215/−139 lines, 9 filesdep −filepathdep ~basedep ~ghc-boot-thPVP ok |
showing 5 of 26 versions
transformers >=0.3 0.6.2.0 → 0.6.3.0
| 2026-01-12 12:42 UTC | 0.6.3.0 | +28/−1 lines, 4 filesPVP: major bump suggested |
| 2025-04-06 22:39 UTC | 0.6.2.0 | +41/−42 lines, 8 filesdep ~ghc-primPVP: major bump suggested |
| 2024-09-25 11:37 UTC | 0.6.1.2 | +70/−21 lines, 19 filesPVP: minor bump suggested |
| 2023-08-01 19:13 UTC | 0.6.1.1 | +281/−42 lines, 11 filesPVP ok |
| 2023-02-04 08:15 UTC | 0.6.1.0 | +64/−4 lines, 8 filesPVP ok |
showing 5 of 42 versions
Reverse dependencies
8038 packages depend on bytestring; 1573 have bounds that exclude 0.12.2.0
aeson-generics-typescript 0.0.0.1 requires bytestring >=0.11.5 && <0.12 excludes current (upper bound)
AndroidViewHierarchyImporter 0.1.0.1 requires bytestring >=0.9 && <0.10 excludes current (upper bound)
arbor-monad-metric-datadog 1.1.2 requires bytestring >=0.10.8 && <0.11 excludes current (upper bound)
attoparsec 0.14.4 requires bytestring >=0.10.4.0 && >=0 && <0.13 && <0.10.4.0 && <0.13 excludes current
aws-academy-grade-exporter 0.1.0.0 requires bytestring >=0.11.5 && <0.12 excludes current (upper bound)
showing 100 of 8038, bound-excluded first