The Protocol Buffers vs FlatBuffers comparison on OctoCounts shows side-by-side source line counts for protocolbuffers/protobuf and google/flatbuffers, counted under the rules and on the dates stated below: files, total lines, code lines, comment lines, blank lines, and per-language totals, pinned to the exact commits listed below.
This page compares the source lines of code (SLOC) of protocolbuffers/protobuf and google/flatbuffers using cached OctoCounts reports. Code size is not code quality: a larger count only means more source material, not a better or worse project.
As of 2026-11-16, protocolbuffers/protobuf contains 1,180,100 total lines (906,385 code) across 2,965 files, while google/flatbuffers contains 136,226 total lines (101,849 code) across 593 files as of 2026-11-06. protocolbuffers/protobuf has about 8.9x the counted code lines of google/flatbuffers under the same engine and counting rules. Code size is not code quality: a larger count only means more source material, not a better or worse project.
| Metric | protocolbuffers/protobuf | google/flatbuffers |
|---|---|---|
| Files | 2,965 | 593 |
| Total lines | 1,180,100 | 136,226 |
| Code lines | 906,385 | 101,849 |
| Comment lines | 148,713 | 19,225 |
| Blank lines | 125,002 | 15,152 |
| Languages counted | 41 | 30 |
Top languages in protocolbuffers/protobuf: C++ (30.2% of code), C# (17.8% of code), C Header (16.8% of code). Top languages in google/flatbuffers: C++ (39.8% of code), C Header (11.6% of code), Rust (10.2% of code). C++, C Header appear in both top language lists; C#, C, Objective-C appear only in protocolbuffers/protobuf's top languages; Rust, Swift, Kotlin appear only in google/flatbuffers's top languages.
Methodology: both counts come from cached OctoCounts reports generated with tokei. protocolbuffers/protobuf was counted at ref main (commit cf1e10c24b0f) on 2026-11-16; google/flatbuffers was counted at ref master (commit 5eb190f00005) on 2026-11-06. See the counting methodology for ignored directories and analysis options.
Both reports use the same engine and effective counting rules. Repository declarations, when enabled, are specific to each repository. protocolbuffers/protobuf: tokei-15.0.0, policy directories-v1; docs excluded, tests excluded, generated excluded. Excluded directory names: .cache, .generated, .git, .next, __tests__, build, dist, doc, docs, documentation, fixtures, gen, generated, node_modules, target, test, tests, vendor. Ignored languages: none. Repository declarations: off. Exclusions are rule-based; they do not prove that every test, document or generated file was removed. google/flatbuffers: tokei-15.0.0, policy directories-v1; docs excluded, tests excluded, generated excluded. Excluded directory names: .cache, .generated, .git, .next, __tests__, build, dist, doc, docs, documentation, fixtures, gen, generated, node_modules, target, test, tests, vendor. Ignored languages: none. Repository declarations: off. Exclusions are rule-based; they do not prove that every test, document or generated file was removed.
Background observations recorded on 2026-09-16; language descriptions here are historical context, not claims about the current filtered shares. Use this page's measured language breakdown for current counts. Repository layout before counting filters: protocolbuffers/protobuf is the Protocol Buffers repository: the schema compiler, plus runtime libraries for many programming languages. google/flatbuffers is the FlatBuffers repository — likewise a serialization project with a compiler and multi-language runtime libraries. Both repositories therefore span many language runtimes in a single tree, not one library, and their measurements were taken on the dates shown above.
The per-language tables are the real story on this page: each repository is a multi-language project, with counted code spread across C++, Java, Python, Go, and other runtime directories, so the totals aggregate implementations for ecosystems a given user may never touch.
Because both projects ship a compiler and language runtimes in one repo, a large share of each count is per-language support code — the same support matrix implemented twice, once per project — rather than serialization logic proper.
Do not read the totals as one-library-vs-one-library: each number is a bundle of many runtimes. If you use one language, the per-language breakdown above is the only part of the count that describes the code you would actually interact with.
Sources: protocolbuffers/protobuf repository (compiler and multi-language runtimes) · google/flatbuffers repository (compiler and multi-language runtimes). Statements verified 2026-09-16.
Evidence and next steps:
Saved reports remain subject to cache cleanup and replacement. Export their JSON for durable citation; live report URLs can change.
Note: code size is not code quality. OctoCounts only reports reproducible line counts and makes no claim that either project is better.
As of 2026-11-16, protocolbuffers/protobuf contains 1,180,100 total lines (906,385 code) across 2,965 files, while google/flatbuffers contains 136,226 total lines (101,849 code) across 593 files as of 2026-11-06. protocolbuffers/protobuf has about 8.9x the counted code lines of google/flatbuffers under the same engine and counting rules. Code size is not code quality: a larger count only means more source material, not a better or worse project.
Not necessarily. SLOC measures size, not complexity, quality, or maintainability. A larger codebase can mean more features, more generated or vendored code, more verbose language idioms, or more tests — none of which imply the code is harder to work with. Use SLOC to gauge the scale of what you'd be reading or maintaining, not as a quality signal for protocolbuffers/protobuf, google/flatbuffers, or any repository.
Methodology: both counts come from cached OctoCounts reports generated with tokei. protocolbuffers/protobuf was counted at ref main (commit cf1e10c24b0f) on 2026-11-16; google/flatbuffers was counted at ref master (commit 5eb190f00005) on 2026-11-06. See the counting methodology for ignored directories and analysis options.
Yes. This page shows the default branch for each repository. Use the interactive comparison tool to pick any public GitHub repository, branch, tag, or commit SHA for both sides and get a fresh side-by-side report.