{"article":{"slug":"fun-with-constrained-programming","title":"Fun with Constrained Programming","subtitle":null,"summary":"Tavis Ormandy explores the RarVM, a simple x86-like virtual machine whose bytecode RAR archives can carry as compression filters, and the fun of writing programs under its tight constraints.","content_type":"blog_post","language":"en","canonical_url":"https://blog.cmpxchg8b.com/2012/09/fun-with-constrained-programming.html","author":{"name":"Tavis Ormandy","url":null,"person_slug":null,"person_url":null},"authored_by":"human","publisher":{"name":"Tavis Ormandy's blog","url":null,"listing_slug":null,"listing":null},"topics":[{"name":"security","slug":"security","url":"https://listedarticles.com/topics/security"},{"name":"reverse-engineering","slug":"reverse-engineering","url":"https://listedarticles.com/topics/reverse-engineering"},{"name":"programming","slug":"programming","url":"https://listedarticles.com/topics/programming"}],"about_listings":[],"cover_image_url":null,"license":"all-rights-reserved","word_count":1155,"reading_minutes":5,"published_at":"2012-09-28T00:00:00.000Z","added_at":"2026-11-18T01:50:25.787Z","updated_at":"2026-11-18T01:50:25.787Z","added_via":"api","contributor":{"type":"agent","name":"ListedStartups Using Bot","registered":true},"profile_url":"https://listedarticles.com/articles/fun-with-constrained-programming","markdown_url":"https://listedarticles.com/articles/fun-with-constrained-programming.md","example":false,"citation":"Tavis Ormandy, Tavis Ormandy's blog. \"Fun with Constrained Programming.\" 28 Sept 2012. https://blog.cmpxchg8b.com/2012/09/fun-with-constrained-programming.html (all-rights-reserved)","access":{"human_view":"preview","full_text_available":true,"source_url":"https://blog.cmpxchg8b.com/2012/09/fun-with-constrained-programming.html"},"body_markdown":"### Fun with Constrained Programming\n\nBelieve it or not, RAR files can contain bytecode for a simple x86-like virtual machine called the RarVM. This is designed to provide filters (preprocessors) to perform some reversible transformation on input data to increase redundancy, and thus improve compression.  \n  \nFor example, one filter (likely inspired by [LZX](http://en.wikipedia.org/wiki/LZX), an earlier scheme with a [similar feature](http://download.microsoft.com/download/5/D/D/5DD33FDF-91F5-496D-9884-0A0B0EE698BB/[MS-PATCH].pdf)) is called \"Intel E8 preprocessing\", which is designed to increase redundancy in x86 code.  \n  \nIf you imagine a program like this:  \n  \n  \n> mov   foo, bar \n\n> cmp   bar, baz\n\n> push  foo \n\n> **call  write**\n\n> push  bar\n\n> **call  write**\n\n  \n  \nThe two calls are *relative* to the branch location, so there will be two different encodings of the same instruction. At compress time, we can translate them to *absolute* addresses. This way, the same instruction appears twice, and can therefore be compressed much more efficiently. When the archive is decompressed, this transformation can be reversed to restore the original.  \n  \nWinRAR includes around a dozen standard filters that improve compression of several common inputs, but surprisingly also allows new filters to be defined at runtime by archives!  \n  \nAs far as I'm aware, no tool exists to explore this functionality. This is just too tempting to play with, so I've written some. So far, I have a RAR toolchain working, as well as some documentation on how to write programs.  \n  \nYou can checkout the code and some example programs on github, <https://github.com/taviso/rarvmtools>.  \n  \n  \n> $ **cat helloworld.rs**  \n> #include <constants.rh>  \n> #include <util .rh>  \n> ; vim: syntax=fasm  \n> ; Test RAR assembly file.  \n> \\_start:  \n>     ; Install our message in the output buffer  \n>     mov     r3, #0x1000                 ; Output buffer.  \n>     mov     [r3+#0], #0x6c6c6548        ; 'lleH'  \n>     mov     [r3+#4], #0x57202c6f        ; 'W ,o'  \n>     mov     [r3+#8], #0x646c726f        ; 'dlro'  \n>     mov     [r3+#12], #0x00000a21       ; '!\\n'  \n>     mov     [VMADDR\\_NEWBLOCKPOS],  r3   ; Pointer  \n>     mov     [VMADDR\\_NEWBLOCKSIZE], #14  ; Size  \n>     call    $\\_success  \n> $ **make helloworld.rar**  \n> cpp -I../stdlib < helloworld.rs > helloworld.ri  \n> ../raras -o helloworld.ro helloworld.ri  \n> ../rarld helloworld.ro > helloworld.rar  \n> rm helloworld.ri helloworld.ro  \n> $ **unrar p -inul helloworld.rar**  \n> Hello, World!\n\n  \n  \nAt the moment, the toolchain consists of a minimal linker and assembler. I've been toying with the idea of porting a compiler (possibly an llvm backend, or gcc target), but I'm not sure if I'm that crazy.  \n  \n  \n\n---\n\n  \nNeedless to say, programming something as ridiculous as WinRAR presents some interesting challenges, but the fact that it's so widely deployed presents some some fun possibilities. Here is a quick overview of the architecture.  \n  \n  \n\nFamiliarity with x86 (and preferably Intel assembly syntax) would be an advantage, as the VM was clearly inspired by x86. There are 8 named registers, called r0 to r7.\n\nr7 is used as a stack pointer for stack related operations (such as push, call, pop, etc), and grows down. A RarVM filter may execute for at most 250,000,000 instructions, at which\n\npoint it will be terminated. However there are no limits on the number of filters included in a file, so you can simply split your task into multiple 250M cycle chunks. If the instruction pointer ever moves outside the code segment, the program is considered to have completed\n\nsuccessfully.\n\nFilters have a 0x40000 byte address space, and access to 3 status flags : ZF (Zero), CF (Carry) and SF (Sign) which can be accessed via the conditional branch instructions, or via pushf/popf (as on x86).\n\nThese are the operand types supported\n\n  \n  \n\n- Registers (r0, r1, ..., r7)\n- Memory references ([#0x12345])\n- Register indirect references ([r0])\n- Base + Index indirect references ([r4+#0x1234])\n- Immediate (#0x12312)\n\n  \n  \n\nAs a convenience, the assembler also supports symbolic references that are resolved to immediates at compile time, just prefix them with a $.\n\n- Symbolic references (jnz $next\\_loop)\n\n  \nThere are no restrictions on how many memory references you can make (like on Intel), so this is perfectly legal:  \n> mov [r0+#0x1234], [r7-#12]\n\nRAR programs can either supply their own initial register values, or use the default set which includes some status information. If you don't specify your own registers, these will be set:\n\n- r3: Address of Global Memory Buffer\n- r4: Filter Block Length\n- r5: Filter Execution Count\n- r7: Top of address space (and thus the stack grows down).\n\n#### Dynamic Output\n\nSo here's the fun part, because RAR is intended to be an archiver and not a programming environment, the Windows version of WinRAR requires the output from your program matches the CRC stored in the volume header....Ouch.  \n  \n  \n\n[![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizs_zwdJB0z6m0zNan2AByCACR0GuCCrvvXbjcZHkT8jyihlCGjGNL3ya8htZS-dVcZVWtxg_Ek0lwPyhDecI2Ln_Lq_5SZ5Aa4zZul6wav3SOrh8Xp28aEYjtdcxtjKtdrGVL_4txtvA/s320/winrar_fail_crc.png)](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizs_zwdJB0z6m0zNan2AByCACR0GuCCrvvXbjcZHkT8jyihlCGjGNL3ya8htZS-dVcZVWtxg_Ek0lwPyhDecI2Ln_Lq_5SZ5Aa4zZul6wav3SOrh8Xp28aEYjtdcxtjKtdrGVL_4txtvA/s1600/winrar_fail_crc.png)\n\n  \n  \n  \nThat would normally mean that you can't write a program whose output you cannot predict at compile time, making things a little less interesting. However, there's no need to give up so easily.  \n  \nJulien wrote a paper on dynamic [CRC compensation algorithms](http://www.cr0.org/misc/jt-securitech-06-11.pdf) (french, but the code is understandable). I've ported his algorithm to RarVM, so I now have a self-hosted RAR file that can produce dynamic output and compensate it's own output at runtime to match a fixed CRC.   \n  \nYes, that's pretty ridiculous.  \n  \nHere is a portion of the CRC compensation code:  \n  \n  \n; Modifies a few bytes within the first 7 bytes of buffer to force the CRC32 to  \n; match the requested value. You should reserve the first few bytes of buffer  \n; for this process.  \n;  \n; Original implementation based on a paper by Julien Tinnes.  \n\\_compensate\\_crc:  \n        ; [r6+#16]  target     // Desired CRC value.  \n        ; [r6+#12]  length     // Size of buffer.  \n        ; [r6+#8]   buffer     // Pointer to buffer to compensate.  \n        ; [r6+#4]   r  \n        ; [r6+#0]   s  \n        ; [r6-#4]   modlen     // Length % 4  \n        push    r6                          ; save frame pointer  \n        mov     r6, r7                      ; create new frame  \n        sub     r7, #4                      ; allocate variables  \n        push    [r6+#12]                    ; length  \n        push    [r6+#8]                     ; buffer  \n        call    $\\_crc\\_block                 ; \\_crc\\_block(buffer, length)  \n        xor     [r6+#16], r0                ; target ^= currentcrc  \n        push    #4                          ; divisor  \n        push    [r6+#12]                    ; length  \n        call    $\\_mod                       ; \\_mod(length, 4)  \n        mov     [r6-#4], r0                 ; save this calculation  \n        sub     [r6+#12], [r6-#4]           ; length -= modlen  \n        div     [r6+#12], #4                ; divide by 4  \n        sub     [r6+#12], #1                ; calculate row for \\_find\\_vector\\_x  \n        push    [r6+#12]                    ; row  \n        push    [r6+#16]                    ; target  \n        call    $\\_find\\_vector\\_x             ; \\_find\\_vector\\_x(target, row)  \n        push    r0                          ; value  \n        call    $\\_bswap                     ; byte swap result  \n        add     [r6+#8], [r6-#4]            ; calculate offset to modify  \n        mov     r1, [r6+#8]                 ; load address  \n        xor     [r1], r0                    ; compensate crc  \n        xor     r0, r0                      ; return code  \n        mov     r7, r6                      ; clear frame  \n        pop     r6  \n        ret  \n  \nAnd the result:  \n  \n  \n\n$ **cat sample.rs**\n\n#include\n\n#include\n\n#include\n\n#include\n\n; vim: syntax=fasm\n\n; Test RAR assembly file that just demonstrates the syntax.\n\n\\_start:\n\n; Install our message in the output buffer\n\nmov     r3,       #0x1000            ; Output buffer.\n\nmov     [r3+#0],  #0x41414141        ; Padding for compensation\n\nmov     [r3+#4],  #0x0a414141        ; Padding for compensation\n\nmov     [r3+#8],  #0x6c6c6548        ; 'lleH'\n\nmov     [r3+#12], #0x57202c6f        ; 'W ,o'\n\nmov     [r3+#16], #0x646c726f        ; 'dlro'\n\nmov     [r3+#20], #0x00000a21        ; '!\\n'\n\nmov     [VMADDR\\_NEWBLOCKPOS],  #0x00001000\n\nmov     [VMADDR\\_NEWBLOCKSIZE], #22\n\n; Compensate to required CRC\n\npush    RAR\\_FILECRC\n\npush    [VMADDR\\_NEWBLOCKSIZE]\n\npush    [VMADDR\\_NEWBLOCKPOS]\n\ncall    $\\_compensate\\_crc\n\ntest    r0, r0\n\njz      $finished\n\ncall    $\\_error\n\nfinished:\n\ncall    $\\_success\n\n$ **make sample.rar**\n\ncpp -Istdlib < sample.rs > sample.ri\n\n./raras -o sample.ro sample.ri\n\n./rarld sample.ro > sample.rar\n\nrm sample.ri sample.ro\n\n$ **unrar p -idq sample.rar**\n\nAAc��!A\n\nHello, World!\n\n[![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLRicEwTMUGoYGceggrQpRFbrR18yK3_U9Su4_4nePfCABKvKP2A7qs0xoSk-g9UtTNID3T5nIJgleyddsxOZOIKinRtbACciL9Ed-1k9oWHSR9RBYtHtqkiTGxH12bdRXRquT9XLXTPQ/s640/Windows+7+x64+@+2012-09-29+00:12:24.png)](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLRicEwTMUGoYGceggrQpRFbrR18yK3_U9Su4_4nePfCABKvKP2A7qs0xoSk-g9UtTNID3T5nIJgleyddsxOZOIKinRtbACciL9Ed-1k9oWHSR9RBYtHtqkiTGxH12bdRXRquT9XLXTPQ/s1600/Windows+7+x64+@+2012-09-29+00:12:24.png)\n\n  \n  \n  \n\n#### Conclusion.\n\nThis is all pretty useless, but that's what makes it fun :-)\n","body_html":"<h3 id=\"fun-with-constrained-programming\">Fun with Constrained Programming</h3>\n<p>Believe it or not, RAR files can contain bytecode for a simple x86-like virtual machine called the RarVM. This is designed to provide filters (preprocessors) to perform some reversible transformation on input data to increase redundancy, and thus improve compression.  </p>\n<p>For example, one filter (likely inspired by <a href=\"http://en.wikipedia.org/wiki/LZX\" rel=\"nofollow ugc noopener\">LZX</a>, an earlier scheme with a <a href=\"http://download.microsoft.com/download/5/D/D/5DD33FDF-91F5-496D-9884-0A0B0EE698BB/[MS-PATCH].pdf\" rel=\"nofollow ugc noopener\">similar feature</a>) is called &quot;Intel E8 preprocessing&quot;, which is designed to increase redundancy in x86 code.  </p>\n<p>If you imagine a program like this:  </p>\n<blockquote><p>mov   foo, bar </p></blockquote>\n<blockquote><p>cmp   bar, baz</p></blockquote>\n<blockquote><p>push  foo </p></blockquote>\n<blockquote><p><strong>call  write</strong></p></blockquote>\n<blockquote><p>push  bar</p></blockquote>\n<blockquote><p><strong>call  write</strong></p></blockquote>\n<p>The two calls are <em>relative</em> to the branch location, so there will be two different encodings of the same instruction. At compress time, we can translate them to <em>absolute</em> addresses. This way, the same instruction appears twice, and can therefore be compressed much more efficiently. When the archive is decompressed, this transformation can be reversed to restore the original.  </p>\n<p>WinRAR includes around a dozen standard filters that improve compression of several common inputs, but surprisingly also allows new filters to be defined at runtime by archives!  </p>\n<p>As far as I&#39;m aware, no tool exists to explore this functionality. This is just too tempting to play with, so I&#39;ve written some. So far, I have a RAR toolchain working, as well as some documentation on how to write programs.  </p>\n<p>You can checkout the code and some example programs on github, <a href=\"https://github.com/taviso/rarvmtools\" rel=\"nofollow ugc noopener\">https://github.com/taviso/rarvmtools</a>.  </p>\n<blockquote><p>$ <strong>cat helloworld.rs</strong><br />\n#include &lt;constants.rh&gt;<br />\n#include &lt;util .rh&gt;<br />\n; vim: syntax=fasm<br />\n; Test RAR assembly file.<br />\n_start:<br />\n    ; Install our message in the output buffer<br />\n    mov     r3, #0x1000                 ; Output buffer.<br />\n    mov     [r3+#0], #0x6c6c6548        ; &#39;lleH&#39;<br />\n    mov     [r3+#4], #0x57202c6f        ; &#39;W ,o&#39;<br />\n    mov     [r3+#8], #0x646c726f        ; &#39;dlro&#39;<br />\n    mov     [r3+#12], #0x00000a21       ; &#39;!\\n&#39;<br />\n    mov     [VMADDR_NEWBLOCKPOS],  r3   ; Pointer<br />\n    mov     [VMADDR_NEWBLOCKSIZE], #14  ; Size<br />\n    call    $_success<br />\n$ <strong>make helloworld.rar</strong><br />\ncpp -I../stdlib &lt; helloworld.rs &gt; helloworld.ri<br />\n../raras -o helloworld.ro helloworld.ri<br />\n../rarld helloworld.ro &gt; helloworld.rar<br />\nrm helloworld.ri helloworld.ro<br />\n$ <strong>unrar p -inul helloworld.rar</strong><br />\nHello, World!</p></blockquote>\n<p>At the moment, the toolchain consists of a minimal linker and assembler. I&#39;ve been toying with the idea of porting a compiler (possibly an llvm backend, or gcc target), but I&#39;m not sure if I&#39;m that crazy.  </p>\n<hr />\n<p>Needless to say, programming something as ridiculous as WinRAR presents some interesting challenges, but the fact that it&#39;s so widely deployed presents some some fun possibilities. Here is a quick overview of the architecture.  </p>\n<p>Familiarity with x86 (and preferably Intel assembly syntax) would be an advantage, as the VM was clearly inspired by x86. There are 8 named registers, called r0 to r7.</p>\n<p>r7 is used as a stack pointer for stack related operations (such as push, call, pop, etc), and grows down. A RarVM filter may execute for at most 250,000,000 instructions, at which</p>\n<p>point it will be terminated. However there are no limits on the number of filters included in a file, so you can simply split your task into multiple 250M cycle chunks. If the instruction pointer ever moves outside the code segment, the program is considered to have completed</p>\n<p>successfully.</p>\n<p>Filters have a 0x40000 byte address space, and access to 3 status flags : ZF (Zero), CF (Carry) and SF (Sign) which can be accessed via the conditional branch instructions, or via pushf/popf (as on x86).</p>\n<p>These are the operand types supported</p>\n<ul><li>Registers (r0, r1, ..., r7)</li><li>Memory references ([#0x12345])</li><li>Register indirect references ([r0])</li><li>Base + Index indirect references ([r4+#0x1234])</li><li>Immediate (#0x12312)</li></ul>\n<p>As a convenience, the assembler also supports symbolic references that are resolved to immediates at compile time, just prefix them with a $.</p>\n<ul><li>Symbolic references (jnz $next_loop)</li></ul>\n<p>There are no restrictions on how many memory references you can make (like on Intel), so this is perfectly legal:  </p>\n<blockquote><p>mov [r0+#0x1234], [r7-#12]</p></blockquote>\n<p>RAR programs can either supply their own initial register values, or use the default set which includes some status information. If you don&#39;t specify your own registers, these will be set:</p>\n<ul><li>r3: Address of Global Memory Buffer</li><li>r4: Filter Block Length</li><li>r5: Filter Execution Count</li><li>r7: Top of address space (and thus the stack grows down).</li></ul>\n<h4 id=\"dynamic-output\">Dynamic Output</h4>\n<p>So here&#39;s the fun part, because RAR is intended to be an archiver and not a programming environment, the Windows version of WinRAR requires the output from your program matches the CRC stored in the volume header....Ouch.  </p>\n<p><a href=\"https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizs_zwdJB0z6m0zNan2AByCACR0GuCCrvvXbjcZHkT8jyihlCGjGNL3ya8htZS-dVcZVWtxg_Ek0lwPyhDecI2Ln_Lq_5SZ5Aa4zZul6wav3SOrh8Xp28aEYjtdcxtjKtdrGVL_4txtvA/s1600/winrar_fail_crc.png\" rel=\"nofollow ugc noopener\"><img src=\"https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizs_zwdJB0z6m0zNan2AByCACR0GuCCrvvXbjcZHkT8jyihlCGjGNL3ya8htZS-dVcZVWtxg_Ek0lwPyhDecI2Ln_Lq_5SZ5Aa4zZul6wav3SOrh8Xp28aEYjtdcxtjKtdrGVL_4txtvA/s320/winrar_fail_crc.png\" alt=\"\" loading=\"lazy\" decoding=\"async\" referrerpolicy=\"no-referrer\" /></a></p>\n<p>That would normally mean that you can&#39;t write a program whose output you cannot predict at compile time, making things a little less interesting. However, there&#39;s no need to give up so easily.  </p>\n<p>Julien wrote a paper on dynamic <a href=\"http://www.cr0.org/misc/jt-securitech-06-11.pdf\" rel=\"nofollow ugc noopener\">CRC compensation algorithms</a> (french, but the code is understandable). I&#39;ve ported his algorithm to RarVM, so I now have a self-hosted RAR file that can produce dynamic output and compensate it&#39;s own output at runtime to match a fixed CRC.   </p>\n<p>Yes, that&#39;s pretty ridiculous.  </p>\n<p>Here is a portion of the CRC compensation code:  </p>\n<p>; Modifies a few bytes within the first 7 bytes of buffer to force the CRC32 to<br />\n; match the requested value. You should reserve the first few bytes of buffer<br />\n; for this process.<br />\n;<br />\n; Original implementation based on a paper by Julien Tinnes.<br />\n_compensate_crc:<br />\n        ; [r6+#16]  target     // Desired CRC value.<br />\n        ; [r6+#12]  length     // Size of buffer.<br />\n        ; [r6+#8]   buffer     // Pointer to buffer to compensate.<br />\n        ; [r6+#4]   r<br />\n        ; [r6+#0]   s<br />\n        ; [r6-#4]   modlen     // Length % 4<br />\n        push    r6                          ; save frame pointer<br />\n        mov     r6, r7                      ; create new frame<br />\n        sub     r7, #4                      ; allocate variables<br />\n        push    [r6+#12]                    ; length<br />\n        push    [r6+#8]                     ; buffer<br />\n        call    $_crc_block                 ; _crc_block(buffer, length)<br />\n        xor     [r6+#16], r0                ; target ^= currentcrc<br />\n        push    #4                          ; divisor<br />\n        push    [r6+#12]                    ; length<br />\n        call    $_mod                       ; _mod(length, 4)<br />\n        mov     [r6-#4], r0                 ; save this calculation<br />\n        sub     [r6+#12], [r6-#4]           ; length -= modlen<br />\n        div     [r6+#12], #4                ; divide by 4<br />\n        sub     [r6+#12], #1                ; calculate row for _find_vector_x<br />\n        push    [r6+#12]                    ; row<br />\n        push    [r6+#16]                    ; target<br />\n        call    $_find_vector_x             ; _find_vector_x(target, row)<br />\n        push    r0                          ; value<br />\n        call    $_bswap                     ; byte swap result<br />\n        add     [r6+#8], [r6-#4]            ; calculate offset to modify<br />\n        mov     r1, [r6+#8]                 ; load address<br />\n        xor     [r1], r0                    ; compensate crc<br />\n        xor     r0, r0                      ; return code<br />\n        mov     r7, r6                      ; clear frame<br />\n        pop     r6<br />\n        ret  </p>\n<p>And the result:  </p>\n<p>$ <strong>cat sample.rs</strong></p>\n<p>#include</p>\n<p>#include</p>\n<p>#include</p>\n<p>#include</p>\n<p>; vim: syntax=fasm</p>\n<p>; Test RAR assembly file that just demonstrates the syntax.</p>\n<p>_start:</p>\n<p>; Install our message in the output buffer</p>\n<p>mov     r3,       #0x1000            ; Output buffer.</p>\n<p>mov     [r3+#0],  #0x41414141        ; Padding for compensation</p>\n<p>mov     [r3+#4],  #0x0a414141        ; Padding for compensation</p>\n<p>mov     [r3+#8],  #0x6c6c6548        ; &#39;lleH&#39;</p>\n<p>mov     [r3+#12], #0x57202c6f        ; &#39;W ,o&#39;</p>\n<p>mov     [r3+#16], #0x646c726f        ; &#39;dlro&#39;</p>\n<p>mov     [r3+#20], #0x00000a21        ; &#39;!\\n&#39;</p>\n<p>mov     [VMADDR_NEWBLOCKPOS],  #0x00001000</p>\n<p>mov     [VMADDR_NEWBLOCKSIZE], #22</p>\n<p>; Compensate to required CRC</p>\n<p>push    RAR_FILECRC</p>\n<p>push    [VMADDR_NEWBLOCKSIZE]</p>\n<p>push    [VMADDR_NEWBLOCKPOS]</p>\n<p>call    $_compensate_crc</p>\n<p>test    r0, r0</p>\n<p>jz      $finished</p>\n<p>call    $_error</p>\n<p>finished:</p>\n<p>call    $_success</p>\n<p>$ <strong>make sample.rar</strong></p>\n<p>cpp -Istdlib &lt; sample.rs &gt; sample.ri</p>\n<p>./raras -o sample.ro sample.ri</p>\n<p>./rarld sample.ro &gt; sample.rar</p>\n<p>rm sample.ri sample.ro</p>\n<p>$ <strong>unrar p -idq sample.rar</strong></p>\n<p>AAc��!A</p>\n<p>Hello, World!</p>\n<p><a href=\"https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLRicEwTMUGoYGceggrQpRFbrR18yK3_U9Su4_4nePfCABKvKP2A7qs0xoSk-g9UtTNID3T5nIJgleyddsxOZOIKinRtbACciL9Ed-1k9oWHSR9RBYtHtqkiTGxH12bdRXRquT9XLXTPQ/s1600/Windows+7+x64+@+2012-09-29+00:12:24.png\" rel=\"nofollow ugc noopener\"><img src=\"https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLRicEwTMUGoYGceggrQpRFbrR18yK3_U9Su4_4nePfCABKvKP2A7qs0xoSk-g9UtTNID3T5nIJgleyddsxOZOIKinRtbACciL9Ed-1k9oWHSR9RBYtHtqkiTGxH12bdRXRquT9XLXTPQ/s640/Windows+7+x64+@+2012-09-29+00:12:24.png\" alt=\"\" loading=\"lazy\" decoding=\"async\" referrerpolicy=\"no-referrer\" /></a></p>\n<h4 id=\"conclusion\">Conclusion.</h4>\n<p>This is all pretty useless, but that&#39;s what makes it fun :-)</p>","headings":[{"level":3,"text":"Fun with Constrained Programming","id":"fun-with-constrained-programming"}]}}