Multilingual Wiki Documentation

You are currently using syntax.
In an attempt to improve PlantUML documentation...
Please do not use this website for your own diagrams.
You can click here and use the online server here for your own documentation.

Back to page content

Changes

Value after edition Value before edition
===== Compression Default Format =====

Compression is done using [[http://en.wikipedia.org/wiki/DEFLATE|Deflate algorithm]]. We will [[https://github.com/plantuml/plantuml/issues/117|add new compression algorithm in some future]].


**Principle**

For example, the following uml text description:

<code>
Alice -> Bob: Authentication Request
Bob --> Alice: Authentication Response
</code>

is encoded as:


To achieve such an encoding, the text diagram is:

- Encoded in UTF-8
- Compressed using [[http://en.wikipedia.org/wiki/DEFLATE|Deflate]] algorithm
- Reencoded in ASCII using a transformation //close// to [[http://en.wikipedia.org/wiki/Base64|base64]]

**Why not use Base64?**

The main reason is historic: this format was not created to be public at first. Now, it's too late to change it. However, the only difference is in character order.

Where in base64 the mapping array for values 0-63 is:
<code>
ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/
</code>

For PlantUML, the mapping array for values 0-63 is:
<code>
0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_
</code>
===== Compression Default Format =====

Compression is done using [[http://en.wikipedia.org/wiki/DEFLATE|Deflate algorithm]]. We will [[https://github.com/plantuml/plantuml/issues/117|add new compression algorithm in some future]].


**Principle**

For example, the following uml text description:

<code>
Alice -> Bob: Authentication Request
Bob --> Alice: Authentication Response
</code>

is encoded as:


To achieve such an encoding, the text diagram is:

- Encoded in UTF-8
- Compressed using [[http://en.wikipedia.org/wiki/DEFLATE|Deflate]] algorithm
- Reencoded in ASCII using a transformation //close// to [[http://en.wikipedia.org/wiki/Base64|base64]]

**Why not use Base64?**

The main reason is historic: this format was not created to be public at first. Now, it's too late to change it. However, the only difference is in character order.

Where in base64 the mapping array for values 0-63 is:
<code>
ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/
</code>

For PlantUML, the mapping array for values 0-63 is:
<code>
0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_
</code>
**Compression·result**

The·following·diagram:

<plantuml>
skinparam·backgroundColor·#EEEBDC
skinparam·handwritten·true

skinparam·sequenceArrowColor·DeepSkyBlue
skinparam·sequenceActorBorderColor·DeepSkyBlue
skinparam·sequenceLifeLineBorderColor·blue
skinparam·sequenceLifeLineBackgroundColor·#A9DCDF
skinparam·sequenceParticipantBorderColor·DeepSkyBlue
skinparam·sequenceParticipantBackgroundColor·DodgerBlue
skinparam·sequenceParticipantFontName·Impact
skinparam·sequenceParticipantFontSize·17
skinparam·sequenceParticipantFontColor·#A9DCDF
skinparam·sequenceActorBackgroundColor·aqua
skinparam·sequenceActorFontColor·DeepSkyBlue
skinparam·sequenceActorFontSize·17
skinparam·sequenceActorFontName·Aapex

actor·User
participant·"First·Class"·as·ParticipantA
participant·"Second·Class"·as·ParticipantB
participant·"Last·Class"·as·ParticipantC

User·->·ParticipantA:·DoWork
activate·ParticipantA

ParticipantA·->·ParticipantB:·Create·Request
activate·ParticipantB

ParticipantB·->·ParticipantC:·DoWork
activate·ParticipantC
ParticipantC·-->·ParticipantB:·WorkDone
destroy·ParticipantC

ParticipantB·-->·ParticipantA:·Request·Created
deactivate·ParticipantB

ParticipantA·-->·User:·Done
deactivate·ParticipantA
</plantuml>

is·compressed·to·a·[[http://www.plantuml.com/plantuml/uml/ZP4zRy8m48Pt_ueJdHawLMMe53iWLK9LLLHrFk8hM04xd9rI-kiR0u8a1CAG8SdpVja-DxP0nZNCCSiNx4ghbLivXeVnU2nJ9Vo9MABLMpOXa8N09OdQFq-Racn62RFR7WnIecAMx-Ig8Zl0B3YMZZNnFVZKV5UFfRfYteEs1oNFgKed7Oftv60oKw0DzpUgYrf9gTCBudxTnDdmXck2rtM1MUY7P-QFuF6f7-nRV3ZzLctSb7YDFPlUSQstgvwG_VG42_eL0kD7-FJ4eZXFWS74i0-WLkZz0D13RMVI96UKEQkxKTb4ftZDKmaHEy3mfP4qggxqot4UQveV3DJi8UflBQqSWMAAae-utuTE3zdma2qFTJDVrQKAXXVvKPawIq9NyUnshS7Du8lbnzh75ReowH-Gx7tYISRc--JEa_i7|428·string·length·using·Deflate]]
**Compression·result**

The·following·diagram:

<plantuml>
skinparam·backgroundColor·#EEEBDC
skinparam·handwritten·true

skinparam·sequenceArrowColor·DeepSkyBlue
skinparam·sequenceActorBorderColor·DeepSkyBlue
skinparam·sequenceLifeLineBorderColor·blue
skinparam·sequenceLifeLineBackgroundColor·#A9DCDF
skinparam·sequenceParticipantBorderColor·DeepSkyBlue
skinparam·sequenceParticipantBackgroundColor·DodgerBlue
skinparam·sequenceParticipantFontName·Impact
skinparam·sequenceParticipantFontSize·17
skinparam·sequenceParticipantFontColor·#A9DCDF
skinparam·sequenceActorBackgroundColor·aqua
skinparam·sequenceActorFontColor·DeepSkyBlue
skinparam·sequenceActorFontSize·17
skinparam·sequenceActorFontName·Aapex

actor·User
participant·"First·Class"·as·ParticipantA
participant·"Second·Class"·as·ParticipantB
participant·"Last·Class"·as·ParticipantC

User·->·ParticipantA:·DoWork
activate·ParticipantA

ParticipantA·->·ParticipantB:·Create·Request
activate·ParticipantB

ParticipantB·->·ParticipantC:·DoWork
activate·ParticipantC
ParticipantC·-->·ParticipantB:·WorkDone
destroy·ParticipantC

ParticipantB·-->·ParticipantA:·Request·Created
deactivate·ParticipantB

ParticipantA·-->·User:·Done
deactivate·ParticipantA
</plantuml>

is·compressed·to·a·[[http://www.plantuml.com/plantuml/uml/ZP4zRy8m48Pt_ueJdHawLMMe53iWLK9LLLHrFk8hM04xd9rI-kiR0u8a1CAG8SdpVja-DxP0nZNCCSiNx4ghbLivXeVnU2nJ9Vo9MABLMpOXa8N09OdQFq-Racn62RFR7WnIecAMx-Ig8Zl0B3YMZZNnFVZKV5UFfRfYteEs1oNFgKed7Oftv60oKw0DzpUgYrf9gTCBudxTnDdmXck2rtM1MUY7P-QFuF6f7-nRV3ZzLctSb7YDFPlUSQstgvwG_VG42_eL0kD7-FJ4eZXFWS74i0-WLkZz0D13RMVI96UKEQkxKTb4ftZDKmaHEy3mfP4qggxqot4UQveV3DJi8UflBQqSWMAAae-utuTE3zdma2qFTJDVrQKAXXVvKPawIq9NyUnshS7Du8lbnzh75ReowH-Gx7tYISRc--JEa_i7|428·string·length·using·Deflate]]


Please report any bugs to plantuml@gmail.com or here.
This website is still in beta testing.