Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

On read, deflated block size is always reported as full buffer size #16

Open
abyrd opened this issue Oct 28, 2015 · 1 comment
Open

Comments

@abyrd
Copy link
Member

abyrd commented Oct 28, 2015

During VEX format reads, the block size is always reported as the full buffer size.
Perhaps java.util.zip.Inflater#inflate(byte[], int, int) always fills the whole output buffer.

21:43:45.492 [Thread-1] DEBUG com.conveyal.osmlib.VEXBlock - Read block of 2097152 bytes.
21:43:45.492 [Thread-1] DEBUG com.conveyal.osmlib.VEXBlock - Contained 225787 entities with type 0.
21:43:45.620 [Thread-0] DEBUG com.conveyal.osmlib.VEXBlock - Wrote block of 1334622 bytes.
21:43:45.620 [Thread-0] DEBUG com.conveyal.osmlib.VEXBlock - Contained 241566 entities with type 0.
21:43:45.620 [main] INFO  com.conveyal.osmlib.VexInput - Processed 9960 blocks
21:43:45.636 [Thread-1] DEBUG com.conveyal.osmlib.VEXBlock - Read block of 2097152 bytes.
21:43:45.636 [Thread-1] DEBUG com.conveyal.osmlib.VEXBlock - Contained 216809 entities with type 0.
21:43:45.762 [Thread-0] DEBUG com.conveyal.osmlib.VEXBlock - Wrote block of 1279096 bytes.
21:43:45.762 [Thread-0] DEBUG com.conveyal.osmlib.VEXBlock - Contained 240155 entities with type 0.
@abyrd
Copy link
Member Author

abyrd commented Oct 28, 2015

After inflater.finished() is true, both the pos variable being incremented in the loop and the inflater's internal bytes written counter will both equal the full size of the output buffer. This appears to be intentional behavior of inflate().

How can we get the true size of the decompressed data?

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

No branches or pull requests

1 participant