A method for compressing a flow of CAN-bus messages, which comprises: (A) during a training stage: (a) determining at least one series-type pattern; (b) defining a compressed series-type command for each of said patterns, each command comprising parameters of: (b.l) a timestamp of a first message; (b.2) a message-ID; (b.3) a type of pattern; (b.4) an indication of a field within the messages; (b.5) a parameter value at the first message; (b.6) period between messages; and (b.7) number of messages; (B)during a compression stage: (c)dividing a record of CAN-bus messages into groups of a same message-ID; (d) within each group, finding messages of a same pattern; (e) for each series, forming a compressed command in a form as defined with values for at least several parameters; and (C)during a decompression stage: (f) using the series-type compressed commands to reconstruct the content of the series of messages.
展开▼