Skip to content

Internal Information

Ryandw11 edited this page Dec 16, 2020 · 3 revisions

This page has information about the internal workings of ODS. If you are a beginner and/or do not care about very performance than you do not need to read this page. (By performance we mean squeezing every bit of performance. ODS is very performant on its own and in almost all scenarios you do not need to worry about it.)

File Format

Compression

ODS supports 3 compression modes by default: NONE, GZIP, and ZLIB.
Additional compression formats can be added in.

Tag Limitations

Tag Names

Tag names can only container 32,767 characters.

Tag Limitations

Tags can only contain 2,147,483,647 bytes or 2 GB of information. This includes the header of tags.

File Performance

This is specific to ODS for Java.

Compression

In ODS files are compressed using the built in input/output streams that Java provides.

Memory Usage

The memory usage of compressed files will be slightly higher when getting information from a file.

When no file compression is used ODS streams bytes from the file using a MappedByteBuffer. If you are storing a large amount of data it might be useful to store it in a non-compressed file if you have the space. Another option is to store the data in multiple ODS files.

Custom Tags

Custom tags use Java Reflection in order to create an instance of the tag. This can slow down file reading depending on how often files with custom tags are read. (Note: ODS will only use reflection when the custom tag is retrieved using the get() or getAll() methods. This has no affect when the custom tag is not being retrieved.)