xstate-viz
xstate-viz copied to clipboard
Sharing machine code by encoding it into URL
trafficstars
For now it is impossible to share a visualizer with a machine code in it privately. But the code itself may be shared by encoding machine code into the URI like it implemented in Mermaid Live Editor (sample link). It will keep privacy and don't require to keep code on the server side.
The only limitation is URI length. But it will not be a problem for Chrome and Opera and not a big problem for Firefox and Safari (according to geeksforgeeks.org):
- Google Chrome allows the maximum length of the URL to be of the size 2MB(2048 characters).
- In Mozilla Firefox the length of the URL can be unlimited but practically after 65,536 characters the location bar no longer displays the URL.
- Opera allows the URL length to be unlimited.
- Safari - the maximum length of URL in Safari is 80000 characters after crossing this limit the page displays an error.