nasa / bplib

Apache License 2.0
27 stars 13 forks source link

Split "v7_codec.c" into smaller parts #216

Closed jphickey closed 1 year ago

jphickey commented 1 year ago

Is your feature request related to a problem? Please describe. This file is nearly 2000 lines and contains many small functions. This means that the unit tests for this will likely be even larger, in order to test all the paths.

Describe the solution you'd like Split this large .c file into smaller chunks. For example, encoder and decoder functions probably do not overlap and thus could be in separate source files. Also all of the different block types could be in separate source files.

Additional context Separating each block type codec into a separate source would have benefits for extensibility as well, because it is expected in the future this code will have to handle additional user-defined block types. Thus there should probably be a registration mechanism and branch table for this.

Requester Info Joseph Hickey, Vantage Systems, Inc.