Smallest text file format that preserves line breaks?

Puppy related raves and general interest that doesn't fit anywhere else
Post Reply
Message
Author
User avatar
darrelljon
Posts: 551
Joined: Sun 08 Apr 2007, 11:10
Contact:

Smallest text file format that preserves line breaks?

#1 Post by darrelljon »

What's the smallest file format for text files that preserves line breaks? I tried ASCII but it came out bigger than ODT!

User avatar
Moose On The Loose
Posts: 965
Joined: Thu 24 Feb 2011, 14:54

Re: Text documents

#2 Post by Moose On The Loose »

darrelljon wrote:What's the smallest file format for text files that preserves line breaks? I tried ASCII but it came out bigger than ODT!
ODT is compressed. This makes it smaller. abiword also makes compressed files. These in my experience are smaller than ODT files.

Very small can be done by zipping plain ASCII files.

big_bass
Posts: 1740
Joined: Mon 13 Aug 2007, 12:21

#3 Post by big_bass »

you could write your own tools
here is a simple way to fold the text
so it looks nice in geany
just remember this is linux if you dont
find what you want you can make it

Code: Select all

#!/bin/sh

# big-bass dragNdrop file here
# fold the text at 70 characters and #rename to file.cleaned

fold -sw 70 "$@" > "$@"".cleaned"

User avatar
darrelljon
Posts: 551
Joined: Sun 08 Apr 2007, 11:10
Contact:

#4 Post by darrelljon »

Okay done a bit of a test on the same document (103813 characters if you want to compare in other formats); no special formatting except line breaks.
here are the results in reverse size order

246KB - ABW (Abiword)
180KB - DOCX (Microsoft Office Open XML)
172KB - RTF (Rich Text Format)
164KB - PAGES (Apple iWork 08 Pages)
152KB - PAGES (Apple iWork 09 Pages)
143KB - DOC (Microsoft Word Document)

Note of the six biggest document formats, three are Microsoft proprietary and two are Apple.
Of the biggest common document formats, all three are Microsoft proprietary formats,

139KB - PDF (common including for all ebook readers including Kindle but not reflowable)
108KB - WPS (Microsoft Works 4.0)
107KB - WPD (Corel WordPerfect)
106KB - TXT (Plain text works on some ebook readers)
106KB - TEX (Tex supposed to be good for design and formatting)
82KB - AZW3 (Amazon Kindle proprietary format, one of two main incompatible ebook-specific formats)

Note the four smallest are free open source formats

49KB - ODT (OpenDocument Format - used in LibreOffice, OpenOffice.org etc.)
41KB - EPUB (one of two main incompatible ebook-specific formats)
41KB - ZABW (GZipped Abiword)
37KB - BZABW (BZ2 Abiword)

Post Reply