Skip to content

Releases: indunet/fastproto

v4.1.0

26 Jan 13:42

Choose a tag to compare

Added

  • fastproto bundle module: New fastproto-bundle module (artifactId: fastproto) that aggregates core and processor, allowing users to include just one dependency for full functionality
  • Integration tests for the bundle module to verify aggregated functionality

Removed

  • Removed CodecProcessor and @GenerateCodec annotation (limited practical value)
  • Removed runtime dynamic compilation (FormulaBuilder and related classes); lambda formulas now rely entirely on compile-time code generation

Changed

  • Project restructured into three modules:
    • fastproto-core - Core library
    • fastproto-processor - Annotation processor
    • fastproto (bundle) - Aggregator module, recommended for users
  • Updated documentation to simplify dependency references

Migration Guide

Users upgrading from 4.0.0 now only need one dependency:

Maven:

<dependency>
    <groupId>org.indunet</groupId>
    <artifactId>fastproto</artifactId>
    <version>4.1.0</version>
</dependency>

v4.0.0

25 Jan 17:50

Choose a tag to compare

Breaking Changes

  • Multi-module restructure: Project split into two modules:
    • fastproto - Core library with all runtime functionality (backwards compatible artifactId)
    • fastproto-processor - Annotation processor for compile-time formula generation
  • Dynamic lambda compilation is now disabled by default for better Android/JRE compatibility

Added

  • fastproto-processor module with SPI auto-discovery for annotation processors
  • FormulaProcessor - Generates Function classes at compile time for @DecodingFormula(lambda="...") and @EncodingFormula(lambda="...")
  • CodecProcessor - Generates codec wrapper classes for @GenerateCodec annotated classes
  • FormulaRegistry - Runtime lookup for compile-time generated formula classes
  • Full Android and Java 11+ JRE compatibility for lambda formulas via annotation processor

Changed

  • Lambda formulas now use compile-time code generation instead of runtime dynamic compilation
  • Users need to add fastproto-processor as a dependency to use lambda formula features
  • Updated documentation for new multi-module structure

Migration Guide

For users upgrading from 3.x:

v3.12.3

23 Nov 10:23

Choose a tag to compare

Added

  • New @BcdType annotation and BcdCodec for fixed-length packed BCD integers (with byte order support), mapped to int / Integer.
  • Unit tests and FastProto integration tests for BCD, covering big-endian / little-endian and error conditions.
  • New @Expect / @Expects annotations for constant assertions at fixed offsets; verify on decode and auto-fill constants on encode.

Changed

  • README and Quick Start: added side-by-side examples comparing manual bit/offset parsing to FastProto’s annotation-based approach, plus an explicit “Design Philosophy” section.
  • Docs site (docs/index.html, docs/annotation-mapping.md, etc.): documented BCD type mapping and behavior, and refreshed core feature descriptions.
  • Core resolving pipeline: extended dynamic lengthRef support so computed lengths are bound to preceding fields and propagated through Resolver / CodecFlow into string/array/struct-array codecs.
  • Core resolving pipeline: extended dynamic offsetRef support so offsets can reference numeric fields; Resolver binds offset suppliers and CodecFlow wraps annotations, making offset honor runtime values during encode/decode.

v3.12.2

26 Aug 16:09

Choose a tag to compare

Added

  • @AutoType now supports lengthRef for variable-length strings/arrays/collections with auto type inference.
  • Checksum enhancements: range-based checksum calculation support.
  • Documentation: added docs/variable-length.md (variable length & struct arrays) and new integration pages docs/netty-integration.md, docs/kafka-integration.md.
  • Variable-length support: via lengthRef referencing a count field, enabling variable-length strings/arrays and struct arrays.

Changed

  • Proxy forwarding: ProtocolType.proxy(AutoType, ...) forwards lengthRef to target annotations (e.g., StringType, *ArrayType, StructArrayType).
  • Docs & examples: help sidebar includes “Variable Length & Struct Arrays”; installation snippets updated to 3.12.2.

Fixed

  • DateCodecTest stability: truncate Instant/LocalDateTime to milliseconds.

v3.12.1

21 Aug 00:27

Choose a tag to compare

Fixed

  • ByteBuffer: auto-growth when writing beyond current capacity on non-fixed buffers to prevent ArrayIndexOutOfBounds.
  • ByteBufferIOStream.align: validation now requires a positive power-of-two alignment; incorrect values throw IllegalArgumentException.

Changed

  • Docs site: redesigned docs/index.html homepage (overview, features, basic usage), set Quick Start as default in help, added icons to features.
  • Version references in docs updated to 3.12.1.

Added

  • Android compatibility guide docs/android.md and cross-links.

v3.12.0

11 Aug 03:47

Choose a tag to compare

  • Single-annotation checksum

    • New @Checksum(start, length, offset, type, byteOrder) defines the compute range and storage location in one place.
    • Works seamlessly in both encode (auto-write) and decode (auto-verify) flows.
  • Broader algorithm coverage

    • Added: CRC8_SMBUS, CRC8_MAXIM, XOR8 (BCC), LRC8, CRC16_MODBUS, CRC16_CCITT, CRC32C, CRC64_ECMA-182, CRC64/ISO.
    • Endianness for stored values honored via byteOrder; computation range is endianness-agnostic.
  • Performance & robustness

    • ChecksumUtils reuses singleton engines to avoid per-call allocations.
    • Explicit error on unsupported type (CodecException).

v3.11.0

24 Jun 14:40

Choose a tag to compare

  1. Introduced checksum annotations and pipeline support (ChecksumFlow, Pipeline improvements).
  2. Added network and IoT usage examples.
  3. Implemented double-read tests for ByteBufferInputStream.
  4. Add checksum.

v3.10.3

14 Aug 06:29

Choose a tag to compare

Fix bugs when using @DecodingIgnore & @EncodingIngore.

v3.1.3

12 Aug 11:59

Choose a tag to compare

Fix bugs when using @DecodingIgnore & @EncodingIngore.

v3.10.2

08 Feb 05:58

Choose a tag to compare

  1. remove CodecUtils;
  2. add DecodeUtils and EncodeUtils;
  3. update README.md