PHPackages                             konstantinkuklin/doctrine-compressed-fields - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. konstantinkuklin/doctrine-compressed-fields

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

konstantinkuklin/doctrine-compressed-fields
===========================================

Library provide functional to split data from entity to different property by bit mask.

216PHP

Since Aug 30Pushed 8y ago2 watchersCompare

[ Source](https://github.com/KonstantinKuklin/doctrine-compressed-fields)[ Packagist](https://packagist.org/packages/konstantinkuklin/doctrine-compressed-fields)[ RSS](/packages/konstantinkuklin-doctrine-compressed-fields/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

Doctrine Compressed Fields
==========================

[](#doctrine-compressed-fields)

Doctrine Compressed Fields is a **library** which is allow to store data from different Entity properties in one column by using bits mask.

[![Build Status](https://camo.githubusercontent.com/de7c3918403d3b1e957fa4f20a1ee6775f2652dec537e1f132b39bf50ef064c5/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f4b6f6e7374616e74696e4b756b6c696e2f646f637472696e652d636f6d707265737365642d6669656c64732e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/KonstantinKuklin/doctrine-compressed-fields)[![GitHub release](https://camo.githubusercontent.com/22601365f8ee58da655df8383d61a5c165f6c1358cea18f04fdbd2c56ce338a8/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f4b6f6e7374616e74696e4b756b6c696e2f646f637472696e652d636f6d707265737365642d6669656c64732e737667)](https://github.com/KonstantinKuklin/doctrine-compressed-fields/releases/latest)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/4e73145fb08cbfb698cb17cca1b4d6fcc24afe480617a6a9c736cf69cf94b194/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f4b6f6e7374616e74696e4b756b6c696e2f646f637472696e652d636f6d707265737365642d6669656c64732f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/KonstantinKuklin/doctrine-compressed-fields/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/c8ae908871e27a42766c976bdaf018a385d37d5327bba4e85e4d21bbd220100c/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f4b6f6e7374616e74696e4b756b6c696e2f646f637472696e652d636f6d707265737365642d6669656c64732f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/KonstantinKuklin/doctrine-compressed-fields/?branch=master)[![Minimum PHP Version](https://camo.githubusercontent.com/ed3d5f316ab7046990f8dbe388251ead80e0b003b22814d531ddbfc332a20cf1/687474703a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344253230372e302d3838393242462e737667)](https://php.net/)[![License](https://camo.githubusercontent.com/afe3a47a1d6d186388832eb98c71b3e9ceabdd59b0fc7d22a0df64c84734d5b0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f4b6f6e7374616e74696e4b756b6c696e2f646f637472696e652d636f6d707265737365642d6669656c64732e737667)](https://packagist.org/packages/KonstantinKuklin/doctrine-compressed-fields)

DO NOT USE IN PRODUCTION! Developing still in progress.

Motivation
----------

[](#motivation)

Sometimes we need to store simple boolean value like true or false and we use for it `tinyint(1)` which cost is 1 byte(bits).

`So we lose 7 bits` on every such value if a column! Just imagine we lose 7k bits(700b = 0.68kb) on each 1k rows with 1 bool element stored in `tinyint(1)`. Here you can find the solution, how to store data without losing memory and hdd free space.

Installation using composer
---------------------------

[](#installation-using-composer)

Execute in console:

```
composer require konstantinkuklin/doctrine-compressed-fields
```

Documentation
-------------

[](#documentation)

- in progress

Running tests
-------------

[](#running-tests)

To run the tests, you need the sqlite extension for php. On Unix-like systems, install:

`php5-sqlite`

On Windows, enable the extension by uncommenting the following lines in php.ini

```
extension = php_pdo_sqlite.dll
extension = php_sqlite3.dll
extension_dir = ext

```

Running the tests from the project root:

```
./vendor/bin/phpunit
```

On Windows run phpunit from the full path

```
phpunit
```

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/14bf2bc19526615387e37a0e04bb5110ec344663a6bc8e95c3b9947cd5b9808c?d=identicon)[KonstantinKuklin](/maintainers/KonstantinKuklin)

---

Top Contributors

[![KonstantinKuklin](https://avatars.githubusercontent.com/u/573586?v=4)](https://github.com/KonstantinKuklin "KonstantinKuklin (3 commits)")

### Embed Badge

![Health badge](/badges/konstantinkuklin-doctrine-compressed-fields/health.svg)

```
[![Health](https://phpackages.com/badges/konstantinkuklin-doctrine-compressed-fields/health.svg)](https://phpackages.com/packages/konstantinkuklin-doctrine-compressed-fields)
```

###  Alternatives

[square1/laravel-collection-rolling-average

Extend collections to support rolling average functionality.

2310.0k](/packages/square1-laravel-collection-rolling-average)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
