# x8l
**Repository Path**: cyanpotion/x8l
## Basic Information
- **Project Name**: x8l
- **Description**: A new markup language, which can replace xml in most areas, but always use smaller size.
- **Primary Language**: Java
- **License**: MIT
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2020-09-02
- **Last Updated**: 2020-12-19
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# x8l
[](https://maven-badges.herokuapp.com/maven-central/com.xenoamess/x8l)
[](https://opensource.org/licenses/MIT)
[](https://sonarcloud.io/dashboard?id=cyanpotion_x8l)
X8l format is a type of data format, it is designed to be replace of xml/json in most cases when you need the data be shorter(while remains readability).
See plugin on Jetbrains plugin storage
See plugin on github
See X8l Grammar/SDK
See X8l Spring Context

Send Feedback
## aim of x8l
when I deal with markup languages I just find that some of them are unnecessarily swollen.
They use much more disk than they need.
Of course some reasons might be considering ability of random access or other things,
but in most cases, we just use dom and load the whole tree into our memory,
and we just want it to be smaller.
After all network, or IO, is still a bottle-neck.
So we bring up a new markup language here.
x8l is a variant of xml, and aim to use as small space as possible.
A naive xml (one without XLS or DTD or some things) can be transform into a x8l, and then transform back without losing data.
A json file can also be transformed into a x8l or transform back (but every value of every attribute will lose their type information and become pure string).
## bench mark.
We use some data from a wiki mirror to get the xml bench mark.
The average ratio after a transform from xml to x8l is around 84%,
Which means about 16% of the size can be reduced.
We use some data from a json file to get the xml bench mark.
The average ratio after a transform from json to x8l is around 99%,
Which means about 1% of the size can be reduced.
(Notice that we only do json bench mark for prove of expandability of x8l.
We want to make sure when a data can be saved as json, it shall be able to be saved to x8l.
Of course due to x8l's lack of type information, all type information of attributes will lost in this process)
The details of the bench marks are in com.xenoamess.x8l.BenchMark
## basic tutorial of x8l
here goes a basic demo of x8l.
### comment
first,a comment is like this
```text
<
```
or this
```text
<
```
or even this. < in a comment need not be transcoded.
```text
<<
```
use % to transcode. A character after % is treated as a simple character.
```text
<