{"id":36606737,"url":"https://github.com/cyanpotion/x8l","last_synced_at":"2026-01-12T08:46:04.454Z","repository":{"id":37549908,"uuid":"161894258","full_name":"cyanpotion/x8l","owner":"cyanpotion","description":"A new markup language, which can replace xml\u0026json in most areas, but always use smaller size.","archived":false,"fork":false,"pushed_at":"2025-12-18T11:49:43.000Z","size":75954,"stargazers_count":4,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-20T08:18:12.753Z","etag":null,"topics":["compression","markup-language"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cyanpotion.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2018-12-15T10:31:32.000Z","updated_at":"2025-12-18T11:49:40.000Z","dependencies_parsed_at":"2024-01-01T00:45:22.978Z","dependency_job_id":"6d29050a-36a7-4266-9f6b-f1d558d1186c","html_url":"https://github.com/cyanpotion/x8l","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"purl":"pkg:github/cyanpotion/x8l","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyanpotion%2Fx8l","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyanpotion%2Fx8l/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyanpotion%2Fx8l/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyanpotion%2Fx8l/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cyanpotion","download_url":"https://codeload.github.com/cyanpotion/x8l/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyanpotion%2Fx8l/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28337599,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T06:09:07.588Z","status":"ssl_error","status_checked_at":"2026-01-12T06:05:18.301Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["compression","markup-language"],"created_at":"2026-01-12T08:46:04.391Z","updated_at":"2026-01-12T08:46:04.441Z","avatar_url":"https://github.com/cyanpotion.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# x8l\n[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.xenoamess/x8l/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.xenoamess/x8l)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/cyanpotion/x8l)\n\u003c!--[![Build status](https://ci.appveyor.com/api/projects/status/594i6j3y8w8o2a69?svg=true)](https://ci.appveyor.com/project/XenoAmess/x8l)--\u003e\n\n\u003cp\u003e\n  \u003cb\u003e\n      X8l format is a type of data format, it is designed to be a replacement of xml/json in most cases when you need the data be shorter(while remains readability).\n  \u003c/b\u003e\n\u003c/p\u003e\n\u003cbr/\u003e\n\u003cp\u003e\n  \u003cb\u003e\n      See \u003ca href=\"https://plugins.jetbrains.com/plugin/13915-x8l\"\u003eplugin on Jetbrains plugin storage\u003c/a\u003e\u003cbr/\u003e\n      See \u003ca href=\"https://github.com/XenoAmess/x8l_idea_plugin\"\u003eplugin on github\u003c/a\u003e\u003cbr/\u003e\n      See \u003ca href=\"https://github.com/cyanpotion/x8l\"\u003eX8l Grammar/SDK\u003c/a\u003e\u003cbr/\u003e\n      See \u003ca href=\"https://github.com/XenoAmess/x8l_spring_context\"\u003eX8l Spring Context\u003c/a\u003e\u003cbr/\u003e\n  \u003c/b\u003e\n\u003c/p\u003e\n\u003cbr/\u003e\n\u003cp\u003e\u003cimg src=\"https://raw.githubusercontent.com/XenoAmess/x8l_idea_plugin/master/pictures/screenshot.png\" width=\"1080\" height=\"720\" alt=\"screenshot.png\"/\u003e\u003c/p\u003e\n\u003cbr/\u003e\n\u003cp\u003e\u003ca href=\"https://github.com/XenoAmess/x8l_idea_plugin/issues\"\u003eSend Feedback\u003c/a\u003e\u003c/p\u003e\n\n## aim of x8l\nwhen I deal with markup languages I just find that some of them are unnecessarily swollen.\n\nThey use much more disk than they need.\n\nOf course some reasons might be considering ability of random access or other things,\nbut in most cases, we just use dom and load the whole tree into our memory,\nand we just want it to be smaller.\n\nAfter all network, or IO, is still a bottle-neck.\n\nSo we bring up a new markup language here.\n\nx8l is a variant of xml, and aim to use as small space as possible.\n\nA naive xml (one without XLS or DTD or some things) can be transform into a x8l, and then transform back without losing data.\n\nA 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).\n\n## bench mark.\n\nWe use some data from a wiki mirror to get the xml bench mark.\n\nThe average ratio after a transform from xml to x8l is around 84%,\nWhich means about 16% of the size can be reduced. \n\nWe use some data from a json file to get the xml bench mark.\n\nThe average ratio after a transform from json to x8l is around 99%,\nWhich means about 1% of the size can be reduced. \n\n(Notice that we only do json bench mark for prove of expandability of x8l.\nWe want to make sure when a data can be saved as json, it shall be able to be saved to x8l.\nOf course due to x8l's lack of type information, all type information of attributes will lost in this process)\n\nThe details of the bench marks are in com.xenoamess.x8l.BenchMark\n\n## basic tutorial of x8l\n\nhere goes a basic demo of x8l.\n\n### comment\n\nfirst,a comment is like this\n```text\n\u003c\u003cfirst,a comment is like this\u003e \n```\nor this\n```text\n\u003c \u003cor even this\u003e  \n```\nor even this. \u003c in a comment need not be transcoded.\n```text\n\u003c\u003c\u003cor even this this.\u003c in a comment need not be transcoded.\u003e  \n```\nuse % to transcode. A character after % is treated as a simple character. \n```text\n\u003c\u003cuse %% to transcode. A character after % is treated as a simple character. for example, %\u003e, and this is still in it.\u003e\n```\n\n### attributes\n\nthe content between the first \u003c and the second \u003c is treated as \"attributes\".\n```text\n\u003c\u003cthe content between the first \u003c and the second \u003c is treated as \"attributes\".\u003e  \n```\nthe order of attributes is important, and node with different order of same attributes are different.\n\nattribute can have = in it.if so, it will be departed into key and value.\n\nkey is the part left to the first =,and value is the rest content.\n\nfor example, \"a\" is a key and \"b\" is a value\n```text\n\u003ca=b\u003e\u003e\n```\nremember, the first =.\n```text\n\u003ca=b=c\u003e\u003e\n```\nthat means this node's key is \"a\" and value is \"b=c\"\n\nif there is no \"=\" in an attribute then the whole string is the key,and \"\" is the value\n\nnotice that both keys and values in attributes will only be treated string, but not float or double or datetime or something.\n\nspace chars between attributes are treated as nothing, so does '\\r' '\\n' '\\t'\nwhich means you can write it like this\n```text\n\u003cviews\n    windowWidth=1280\n    windowHeight=1024\n    scale=2.0\n    fullScreen=0\n\u003e\u003e\n```\nAnd it equals to\n```text\n\u003cviews windowWidth=1280 windowHeight=1024 scale=2.0 fullScreen=0\u003e\u003e\n```\n\n### children\n\nthe content between the second `\u003c and the %\u003e` is treated as \"children\".\n\nchildren must be nodes, and children's parent is the node which it in.\n\nthere are now 3 kinds of nodes, \"content node\", \"text node\", and \"comment node\".\n\nonly \"content node\" have attributes and contents.\n\nso what is a text node? A text Node is a text like this.\n```text\nso what is a text node? A text Node is a text like this.\n```\n\nbe careful! a space in text node is meaningful and cannot be deleted!\n\nthat means these are 3 different nodes:\n```text\n\u003c\u003c\u003e\n```\n```text\n\u003c\u003c \u003e\n```\n```text\n\u003c\u003c\n\u003e\n```\n\nif you want to delete all text node with \"empty char\" content,you can use X8lTree.trim().\n\nif you want to have several TextNode continuously, use `\u0026` for the separator:\n```text\n\u003c\u003etextA\u0026textB\u0026textC\u003e\n```\n\nthat is the basic tutorial.\n\nyou can now run the testCases in com.xenoamess.x8l.X8lTest and see the output of the tree of this readme.\n\nthat should be helpful.\n\nthanks for reading.\n\n\n\n## real case of x8l\n```text\n\u003ccommonSettings\n    titleText=GamepadMassage\n    gameWindowClassName=com.xenoamess.gamepad_massage.FalseGameWindow\n    logoClassName=com.xenoamess.gamepad_massage.FalseWorld\n    titleClassName=com.xenoamess.cyan_potion.gameWindowComponents.Title\n    worldClassName=com.xenoamess.gamepad_massage.FalseWorld\n\u003e\u003e\n\u003cviews\n    windowWidth=1280\n    windowHeight=1024\n    scale=2.0\n    fullScreen=0\n\u003e\u003e\n\u003cspecialSettings\n    autoShowGameWindowAfterInit=0\n    noConsoleThread=1\n\u003e\u003e\n\u003cdebug\u003e\u003e\n\u003ckeymap using\u003e\n    \u003cGLFW_KEY_W\u003eXENOAMESS_KEY_UP\u003e\n    \u003cGLFW_KEY_A\u003eXENOAMESS_KEY_LEFT\u003e\n    \u003cGLFW_KEY_S\u003eXENOAMESS_KEY_DOWN\u003e\n    \u003cGLFW_KEY_D\u003eXENOAMESS_KEY_RIGHT\u003e\n    \u003cGLFW_KEY_UP\u003eXENOAMESS_KEY_UP\u003e\n    \u003cGLFW_KEY_LEFT\u003eXENOAMESS_KEY_LEFT\u003e\n    \u003cGLFW_KEY_DOWN\u003eXENOAMESS_KEY_DOWN\u003e\n    \u003cGLFW_KEY_RIGHT\u003eXENOAMESS_KEY_RIGHT\u003e\n    \u003cGLFW_KEY_ESCAPE\u003eXENOAMESS_KEY_ESCAPE\u003e\n    \u003cGLFW_KEY_ENTER\u003eXENOAMESS_KEY_ENTER\u003e\n    \u003cGLFW_KEY_SPACE\u003eXENOAMESS_KEY_SPACE\u003e\n    \u003cGLFW_KEY_LEFT_SHIFT\u003eXENOAMESS_KEY_LEFT_SHIFT\u003e\n    \u003cGLFW_KEY_RIGHT_SHIFT\u003eXENOAMESS_KEY_RIGHT_SHIFT\u003e\n    \u003cGLFW_MOUSE_BUTTON_LEFT\u003eXENOAMESS_MOUSE_BUTTON_LEFT\u003e\n    \u003cGLFW_MOUSE_BUTTON_RIGHT\u003eXENOAMESS_MOUSE_BUTTON_RIGHT\u003e\n    \u003cGLFW_MOUSE_BUTTON_MIDDLE\u003eXENOAMESS_MOUSE_BUTTON_MIDDLE\u003e\n\u003e\n\u003cbackup worldClassName=com.xenoamess.rpg_module.world.World\u003e\u003e\n\u003cbackup worldClassName=com.xenoamess.modern_alchemy.scene.ProgramScene\u003e\u003e\n\u003cbackup worldClassName=com.xenoamess.gamepad_massage.FalseWorld\u003e\u003e\n\u003cbackup gameWindowClassName=com.xenoamess.cyan_potion.GameWindow\u003e\u003e\n\n\u003cmerge version=1.0\u003e\n    \u003c0001\u003e\n        \u003cen\u003eThanks!\u003e\n        \u003c\u003cjust comment\u003e\n\u003cch\u003e谢谢!\u003e\n    \u003e\n    \u003c\u003cjust comment\u003e\n    \u003c0002\u003e\n        \u003cen\u003eHello?\u003e\n\u003c\u003cjust comment\u003e\n\u003cch\u003e您好？\u003e\n    \u003e\n\u003e\n\n\u003cmerge version=1.0\u003e\n    \u003c0001\u003e\n        \u003cen\u003eThanks!\u003e\n        \u003c\u003cjust comment\u003e\n\u003cch\u003e谢谢!\u003e\n    \u003e\n\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcyanpotion%2Fx8l","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcyanpotion%2Fx8l","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcyanpotion%2Fx8l/lists"}