Commit Graph

36 Commits

Author SHA1 Message Date
simonpoole 8219186b2e Extract and make CompressFlags public
Fixes https://github.com/openstreetmap/OSM-binary/issues/68
2024-01-07 11:44:09 +01:00
Simon Legner 3dac689ea7 BlockReaderAdapter: implement Closeable, Flushable 2021-01-04 20:34:57 +01:00
Simon Legner d5bdd020c1 Replace Error with adequate Exceptions
Sometimes wrapped in UncheckedIOException to not change the method signatures.
2021-01-03 23:50:43 +01:00
Simon Legner 9985bf46ad Update Javadoc 2021-01-03 23:40:40 +01:00
Simon Legner 712c8cacf7 Use Java array syntax 2021-01-03 23:39:46 +01:00
Simon Legner b787a1fdaa Modernise Java codebase (Java 8 features) 2021-01-03 23:39:01 +01:00
Simon Legner 22092218af BlockInputStream: implement Closeable 2021-01-03 23:27:41 +01:00
Simon Legner 8789d7f40c BinarySerializer: implement Closeable, Flushable 2021-01-03 23:22:27 +01:00
Simon Legner a683b4c2fa Move Java test files to test.java/ 2021-01-03 19:55:34 +01:00
Jochen Topf 73c5bd159d Fix line endings (CRLF->LF), remove spaces at end of lines 2013-09-02 20:44:02 +02:00
michael fc795d3313 Java file read demonstration, to help people getting started. 2012-10-19 23:00:21 +01:00
Scott Crosby e2aacd59f2 Whitespace changes. 2011-10-29 23:05:32 -05:00
Scott Crosby 4634617791 Document the stringtable sorting. 2011-10-29 23:05:32 -05:00
Scott Crosby 87d7de3090 Get rid of the input.available call. 2011-01-10 22:22:00 -06:00
Scott Crosby fdb5facaff Add in LGPL copyright notices to the osmpbf library. 2011-01-02 20:21:48 -06:00
Scott Crosby f0ea2798ed Rename BlockHeader to BlobHeader 2010-12-21 11:39:02 -06:00
Scott Crosby 7575c1c9bd Change output when dumping granularity. 2010-12-14 11:26:13 -06:00
Scott Crosby 5233aaac0f Remap how we handle compression. 2010-12-14 11:24:58 -06:00
Scott Crosby b26c2e7da1 Define NODATE as Date(-1), or a date before 1970. 2010-12-14 11:24:47 -06:00
Scott Crosby f9de3cfc3c Code for building a test file. 2010-12-14 11:21:53 -06:00
Scott Crosby ebb5cc57ca Remove dead code that causes a warning. 2010-12-14 10:02:20 -06:00
Scott Crosby f2d631527f Set the default date to be Jan 1 1970, not the current date. 2010-12-14 10:01:45 -06:00
Scott Crosby 704cb83b3b For uncompressed data, store the uncompressed size. 2010-11-16 11:35:29 -06:00
Scott Crosby 5f48470e21 Warn about files too big that they may cause failures. 2010-10-07 11:51:31 -05:00
Scott Crosby 6d760534c4 Allow bigger blocks before erroring out, and comment the bounds. 2010-09-16 13:42:05 -05:00
Scott Crosby 7be01e2217 Add in more error detection. 2010-09-15 11:41:26 -05:00
Scott Crosby a1b2112264 Document more of the API for BinaryParser. 2010-09-08 07:48:54 -05:00
Scott Crosby 8a7f784de2 Change API for invoking per-type primitivegroup serializers.
Before, when calling the per-type serializer, we passed it the
encapsulating primitiveblock, into which it would place a newly allocated
primitive group.

Instead, have it return the new group, and then we store in the primitive
block. This will help with re-using per-type serializers for serializing
into non-primitiveblocks.
2010-09-08 07:47:23 -05:00
Scott Crosby fbfba3bdea Don't sort the first 127 entries in the string table.
Gives a small .1% gain. In my design, I try to use the smallest integers as
much as possible so that deflate's entropy coder works more efficiently.
2010-09-02 14:22:41 -05:00
Scott Crosby 4f013ebbfc Be a bit more careful with error handling and printing warning messages. 2010-09-02 07:42:30 -05:00
Scott Crosby cd67ed44e7 Make the granularity state protected instead of private.
Subclasses need to be able to access it.
2010-09-01 15:19:35 -05:00
Scott Crosby 44c9870213 Remove unused imports. 2010-08-30 08:33:51 -05:00
Scott Crosby f933cf162e Revert "Excise references to now-obsolete Nodes"
This reverts commit a625c34e7d.
2010-08-30 08:30:13 -05:00
Scott Crosby a625c34e7d Excise references to now-obsolete Nodes 2010-08-25 11:41:34 -05:00
Scott Crosby 3c4e232984 Support new-format dense nodes that can contain keys and values.
To do this, I need to reserve string id #0 as a delimiter and cannot
generate it anymore.

Forward-compatible format change, in that old files cannot contain
new-format dense nodes, thus the delimiter bug is a non-issue.
2010-08-25 11:40:11 -05:00
Scott Crosby 8f0c4a8bc2 Protobufs and common Java code for binary format. 2010-08-25 11:40:06 -05:00