• Resolved Dan__

    (@davidus16)


    Hello!

    I use BackWpUp with zip-compression. But when I extract the .zip file the source code is compressed.
    This code
    <html>
    <?php echo “Hello World”>
    </html>
    gets like this:
    <html><?php echo “Hello World”></html>

    Why that? I thought zip compression is loss-free?

Viewing 6 replies - 1 through 6 (of 6 total)
  • This has nothing to do with ZIP encoding (Which IS entirely lossless.).
    Nor do I think you “lost” anything.

    You might simply be viewing your code file in a “dumb” viewer on Windows that cannot handle the difference in how End-of-Lines are handled on Linux versus DOS/Windows.

    On Unix/Linux systems each newline in a file is representing as simply an LF (line-feed) character.. On DOS/Windows they use two characters (CR+LF, a CarriageReturn followed by a Line-feed).

    SO… When you view a Linux file (with only an LF between lines) on Windows, dumb viewers (like the Windows Notepad app) do not show the LF alone. Does not see it as needing to show a new line. It visually looks like all the lines have been concatenated (combined).

    Try viewing the same file in a different Windows App.. Like Wordpad, which understands the LF alone as meaning go to a fresh line on screen.

    In the end, it does not matter much.. Files edited/created in Windows apps (and hence has CRs inserted as well) are understood when executed in PHP on Linux. It ignores the stupid CR characters Windows uses at the end of lines.

    • This reply was modified 7 years, 10 months ago by Caleb.
    • This reply was modified 7 years, 10 months ago by Caleb.
    Thread Starter Dan__

    (@davidus16)

    Thanks for your reply. No, I don’t think that I lost anything, of course. ??

    I will try that. Thanks for the explanation.

    If you would let us know what your end result was, and maybe mark as resolved IF you find it do be so?

    @davidus16 I just want to make sure this is resolved for you. Are you still experiencing this issue?

    @davidus16, was our response helpful? If so, could you please mark the ticket as resolved? Otherwise we are glad to help! ??

    @davidus16, since we didn’t hear back from you, we assume that your problem has been fixed and we can mark this ticket as resolved. If we are wrong, please reopen the ticket and provide more information, so we can help to find a proper solution for you! ??

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Why source code gets compressed?’ is closed to new replies.