Improve PotassiumPathArgument encoding 27/106027/2
authorRobert Varga <robert.varga@pantheon.tech>
Thu, 18 May 2023 09:12:23 +0000 (11:12 +0200)
committerRobert Varga <nite@hq.sk>
Thu, 18 May 2023 10:36:52 +0000 (10:36 +0000)
commit643f66cb557acec199fda78580b8c8f08a1a6ef1
tree1be962a6e58e7928ae49138a572ce4c21db9bdc9
parent870daf68c9116f1b28bc0a6919e06516228be2d0
Improve PotassiumPathArgument encoding

As it turns out we have only three different PathArgument types, which
means we can shift one bit towards encoding of size. This allows us to
encode up to 12 path arguments directly.

JIRA: YANGTOOLS-568
Change-Id: Ic3cd1c4e349e5f2d3c2e66a069ab5b0033c16d5c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
codec/yang-data-codec-binfmt/src/main/java/org/opendaylight/yangtools/yang/data/codec/binfmt/PotassiumDataOutput.java
codec/yang-data-codec-binfmt/src/main/java/org/opendaylight/yangtools/yang/data/codec/binfmt/PotassiumPathArgument.java
codec/yang-data-codec-binfmt/src/test/java/org/opendaylight/yangtools/yang/data/codec/binfmt/NipSerializationTest.java