By default, OpenDJ compressing attribute descriptions and object class sets to reduce data size. This is called compact encoding.
By default, OpenDJ does not however compress entries stored in its
backend database. If your entries hold values that compress well —
such as text, and not JPEG photos or MP3 audio — you can gain space
by setting the local DB backend property
entries-compressed to true before you
(re-)import data from LDIF. With entries-compressed: true
OpenDJ compresses entries before writing them to the database.[10]
$ dsconfig set-backend-prop --port 4444 --hostname opendj.example.com --bindDN "cn=Directory Manager" --bindPassword password --backend-name userRoot --set entries-compressed:true --trustAll --no-prompt $ import-ldif --port 4444 --hostname opendj.example.com --bindDN "cn=Directory Manager" --bindPassword password --ldifFile /path/to/Example.ldif --backendID userRoot --includeBranch dc=example,dc=com --start 0 Import task 20120917100628767 scheduled to start Sep 17, 2012 10:06:28 AM CEST
[10] OpenDJ does not proactively rewrite all entries in the database after you change the settings. Instead, to force OpenDJ to compress all entries, import the data from LDIF.

