Shortly compresses the text using the DEFLATE algorithm (http://en.wikipedia.org/wiki/DEFLATE) followed by Base64 encoding (https://en.wikipedia.org/wiki/Base64) before storing it in the URL. Base64 increases the size of data by 33%, but DEFLATE usually decreases the size by more than that. Thus, the link will usually be shorter than the content.