Ubuntu 14.04 has 7zip installed but does not compress anything no change in file compression 4.2 mb still comes out 4.2mb?
File compression doesn't equal file resize. Your 7zip is working just fine.
Compression is an simplifying algorithm, for example, we can compress:
to look like
(we saved some characters - very simple example)
As you can see, this is not always possible + the bigger file, the bigger difference, your file is very small to feel it.
If you want, you can read a bit here about this topic: http://www.makeuseof.com/tag/how-does-file-compression-work/
As others already stated the files you tried may not be compressible much any more, but you may still play around with e.g. the
-mx option which sets the level of compression. See the “ultra settings” example in the man 7z:
7z a -t7z -m0=lzma -mx=9 -mfb=64 -md=32m -ms=on archive.7z dir1 adds all files from directory "dir1" to archive archive.7z using "ultra settings"
Possible values for
-mx are 0, 1, 3, 5 (default), 7 and 9, where 9 is the “ultra” level.