moov-io / iso8583

A golang implementation to marshal and unmarshal iso8583 message.
https://moov.io
Apache License 2.0
306 stars 100 forks source link

auto bitmaps size #182

Closed mfdeveloper508 closed 1 year ago

mfdeveloper508 commented 2 years ago
adamdecaf commented 2 years ago

This LGTM but I'd like @alovak to review it when he's back.

wadearnold commented 1 year ago

Hey, @alovak can you take a look at this?

alovak commented 1 year ago

Sorry for the delay. I hope to review and merge it this/next week @mfdeveloper508 @wadearnold

wadearnold commented 1 year ago

Can we get this merged @alovak ?

alovak commented 1 year ago

The main issue with this implementation is that we should manually set the bitmap size, while in some cases we may not know it. The current implementation automatically reads the next bitmap if the first bit of the current bitmap is set and the solution suggested in the PR breaks this feature.

We should not do/have things like bitmap.SetMapSize(2) here as we don't actually know the length of the bitmap. The bitmap should automatically read two bitmaps.

The alternative version is here: https://github.com/moov-io/iso8583/pull/211