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

add header to serialization format. fixes #22888 #23722

Merged
merged 1 commit into from
Sep 18, 2017
Merged

Conversation

JeffBezanson
Copy link
Sponsor Member

From the doc strings:

| Offset | Description                                     |
|:-------|:------------------------------------------------|
|   0    | tag byte (0x37)                                 |
|   1-2  | signature bytes "JL"                            |
|   3    | protocol version                                |
|   4    | bits 0-1: endianness: 0 = little, 1 = big       |
|   4    | bits 2-3: platform: 0 = 32-bit, 1 = 64-bit      |
|   5-7  | reserved                                        |

A header is written by default if you call serialize(::IO, x), so e.g. files saved this way will have a header. No headers are written automatically if you use a SerializationState.

The platform flags refer to known platforms as of the specified protocol version. If a new platform arises that violates any relevant assumptions, it will need a new flag. There are plenty of bits available.

@mbauman mbauman added this to the 1.0 milestone Sep 15, 2017
@JeffBezanson JeffBezanson changed the title RFC: add header to serialization format. fixes #22888 add header to serialization format. fixes #22888 Sep 18, 2017
@JeffBezanson JeffBezanson merged commit 68d3305 into master Sep 18, 2017
@JeffBezanson JeffBezanson deleted the jb/header branch September 18, 2017 20:30
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

Successfully merging this pull request may close these issues.

2 participants