Git Product home page Git Product logo

glowworm's Introduction

glowWorm

由于温少开源的FastJSON非常优秀,但由于JSON本身协议是需要传输属性名等字符串的,这就使得它在java系统间作为通讯或磁盘存储的序列化方案,就显得不合适了。所以,结合FastJSON的设计 + protocol buffer做了个序列化小东西(glowworm)。
1.它的调用非常简单:
TP tmpTP = new TP(); … … // 序列化 byte[] tmpBytes = PB.toPBBytes(tmpTP); // 反序列化 TP tmpTP_2 = (TP)PB.parsePBBytes(tmpBytes, TP.class);
2.目前支持的类型包括:
Map, HashMap, LinkedHashMap, TreeMap, ConcurrentMap, ConcurrentHashMap, Collection, List, ArrayList, Object, String,char, Character, byte, Byte, short, Short, int, Integer, float, Float, double, Double, long, Long, boolean, Boolean,byte[], short[], int[], long[].class, float[], double[], boolean[], char[], Object[] 作为早期版本,目前还不支持循环引用、引用、自定义输出格式等功能,但作为一个基本的二进制序列化工具,还是有它适用的场合。

======== 更新记录
2012-10-30 增加toPBBytes_Compress和parsePBBytes_Compress两个方法,通过Snappy压缩算法使得byte大小减少更多。
2012-11-06 新增parsePBBytes(byte[] pbBytesParm),不用再传入Class<?> fieldClass这个属性;新增枚举、BigDecimal类型。

glowworm's People

Contributors

netcomm avatar warbaby avatar

Watchers

 avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.