# Parsing compressed JSON at 40 GB/s

DevFeed: [Parsing compressed JSON at 40 GB/s](<https://devfeed.tech/articles/parsing-compressed-json-at-40-gb-s-63108.md>)

Original publisher: [Read original article](<https://lemire.me/blog/2026/10/01/parsing-compressed-json-at-40-gb-s/>)

Author: Daniel Lemire

Published: 2026-10-01T03:10:29Z

Content type: article

Language: en

Sources: [Daniel Lemire](<https://devfeed.tech/sources/daniel-lemire.md>)

Topics: [JSON](<https://devfeed.tech/topics/json.md>), [JSON Feed](<https://devfeed.tech/topics/json-feed.md>), [IO](<https://devfeed.tech/topics/io.md>)

Tags: [benchmark](<https://devfeed.tech/tags/benchmark.md>), [benchmarks](<https://devfeed.tech/tags/benchmarks.md>), [better](<https://devfeed.tech/tags/better.md>), [data](<https://devfeed.tech/tags/data.md>), [database](<https://devfeed.tech/tags/database.md>), [datasets](<https://devfeed.tech/tags/datasets.md>), [gcc](<https://devfeed.tech/tags/gcc.md>), [gzip](<https://devfeed.tech/tags/gzip.md>), [intel](<https://devfeed.tech/tags/intel.md>), [intel-xeon](<https://devfeed.tech/tags/intel-xeon.md>), [json](<https://devfeed.tech/tags/json.md>), [parsing](<https://devfeed.tech/tags/parsing.md>)

## AI overview

The article describes a simdjson demo that parses compressed NDJSON in parallel. Because gzip is a single stream, decompression is sequential, while zstd and lz4 files made of independent frames allow threads to decompress and parse frames independently. In a benchmark using synthetic, repetitive data, the author reports 40 GB/s with 64 threads for zstd and 34 GB/s for lz4, versus 2.5 GB/s for gzip with pipelined parsing; the zstd file was 6% larger than the gzip file. Results may differ on other data.

## Source excerpt

A common way to store JSON data is to write one document per line. We call it NDJSON or JSON Lines. Log files, database exports and machine-learning datasets often come in this format. The files can be large, so we may compress them. {"id":1,"active":true,"user":{"name":"user_1","tags":["guest"]},"score":-3862,"note":"..."} {"id":2,"active":false,"user":{"name":"user_2","tags":["staff","admin"]},"score":8123,"note":"..."} How fast can you read such a file? I wrote ... Continue reading Parsing compressed JSON at 40 GB/s