ldb: replacing length increments with constants in pack