Skip to content

Conversation

@pratikpandey21
Copy link

Fixes: #171

Before:
Screenshot 2025-12-17 at 22 37 30

After:
Screenshot 2025-12-18 at 13 44 36

internalEvent = transactionPayloadEventDeserializer.nextEvent(destinationInputStream);
}
try (ZstdInputStream zstdInputStream = new ZstdInputStream(new java.io.ByteArrayInputStream(eventData.getPayload()))) {
ByteArrayInputStream destinationInputStream = new ByteArrayInputStream(zstdInputStream);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you talk more about the need to move to using input streams here? the old code looked much simpler, did it overflow the output buffer?

}

public void setPayloadSize(int payloadSize) {
public void setPayloadSize(long payloadSize) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

payloadSize can stay an int too i think

// Read the size of the field (use readPackedLong to support large field sizes)
if (inputStream.available() >= 1) {
fieldLen = inputStream.readPackedInteger();
fieldLen = inputStream.readPackedInt();
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

java.io.IOException: Stumbled upon long even though int expected

2 participants