diff --git a/src/Makefile.MESONH.mk b/src/Makefile.MESONH.mk
index 1a1607808dddbd08a100a73eb86d83392a822a1f..90e2b092e4644720f40ffef24f2adfe40bda3735 100644
--- a/src/Makefile.MESONH.mk
+++ b/src/Makefile.MESONH.mk
@@ -1,6 +1,6 @@
-#MNH_LIC Copyright 1994-2014 CNRS, Meteo-France and Universite Paul Sabatier
+#MNH_LIC Copyright 1994-2019 CNRS, Meteo-France and Universite Paul Sabatier
 #MNH_LIC This is part of the Meso-NH software governed by the CeCILL-C licence
-#MNH_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt  
+#MNH_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt
 #MNH_LIC for details. version 1.
 ##########################################################
 #                                                        #
@@ -242,6 +242,19 @@ VPATH               += $(DIR_NEWLFI)
 #ARCH_XYZ    := $(ARCH_XYZ)-$(VER_NEWLFI)
 endif
 ##########################################################
+#           Source COMPRESS                              #
+##########################################################
+ifdef MNH_COMPRESS
+DIR_COMPRESS           = ../LIBTOOLS/lib/COMPRESS/src
+INC_COMPRESS           = -I$(B)$(DIR_COMPRESS)
+DIR_MASTER            += $(DIR_COMPRESS)
+OBJS_LISTE_MASTER     += bitbuff.o nearestpow2.o
+INC                   += $(INC_COMPRESS)
+VPATH                 += $(DIR_COMPRESS)
+CPPFLAGS_COMPRESS     ?= -DLITTLE_endian
+CPPFLAGS              += $(CPPFLAGS_COMPRESS)
+endif
+##########################################################
 #           Source FOREFIRE                              #
 ##########################################################
 ifdef MNH_FOREFIRE
diff --git a/src/Rules.AIX64.mk b/src/Rules.AIX64.mk
index b4de87fcfcd412263c2d4368d91f4926c9c1682d..c207e6df315b23e714f231bfe0b8a1e9afb308bb 100644
--- a/src/Rules.AIX64.mk
+++ b/src/Rules.AIX64.mk
@@ -101,6 +101,11 @@ CNAME_GRIBEX=""
 #if MNH_TOOLS exists => compile the tools
 MNH_TOOLS = yes
 #
+## COMPRESS flag
+#
+#if MNH_COMPRESS exists => compile the COMPRESS library (for LFI files)
+MNH_COMPRESS=yes
+#
 ##########################################################
 #                                                        #
 # Source of MESONH PACKAGE  Distribution                 #
diff --git a/src/Rules.BG.mk b/src/Rules.BG.mk
index d3d34f3f65b1ef977c168061d198e87ace822cad..d34ee73ae7db943c606e83a6b1eac7434770fb53 100644
--- a/src/Rules.BG.mk
+++ b/src/Rules.BG.mk
@@ -112,6 +112,11 @@ CNAME_GRIBEX=""
 #if MNH_TOOLS exists => compile the tools
 #MNH_TOOLS = no
 #
+## COMPRESS flag
+#
+#if MNH_COMPRESS exists => compile the COMPRESS library (for LFI files)
+#MNH_COMPRESS=no
+#
 ##########################################################
 #                                                        #
 # Source of MESONH PACKAGE  Distribution                 #
diff --git a/src/Rules.BGQ.mk b/src/Rules.BGQ.mk
index e1e735144e46e8f1e5aa763e8bddd442e68ee7b5..afd158a03208a2e22e381decded24a5213a75492 100644
--- a/src/Rules.BGQ.mk
+++ b/src/Rules.BGQ.mk
@@ -171,6 +171,11 @@ GRIBAPI_CONF= --host=powerpc64-bgq-linux
 #if MNH_TOOLS exists => compile the tools
 #MNH_TOOLS = no
 #
+## COMPRESS flag
+#
+#if MNH_COMPRESS exists => compile the COMPRESS library (for LFI files)
+#MNH_COMPRESS=no
+#
 ##########################################################
 #                                                        #
 # Source of MESONH PACKAGE  Distribution                 #
diff --git a/src/Rules.LXNAGfor.mk b/src/Rules.LXNAGfor.mk
index d7a8adf967c88fa5ea120ee2497133d9ec976d60..00f9c48b2279f82f2e1f1478177b677dd0308495 100644
--- a/src/Rules.LXNAGfor.mk
+++ b/src/Rules.LXNAGfor.mk
@@ -94,6 +94,11 @@ NETCDF_SUPPFLAGS = -dusty -kind=byte
 #if MNH_TOOLS exists => compile the tools
 MNH_TOOLS = yes
 #
+## COMPRESS flag
+#
+#if MNH_COMPRESS exists => compile the COMPRESS library (for LFI files)
+MNH_COMPRESS=yes
+#
 ##########################################################
 #                                                        #
 # Source of MESONH PACKAGE  Distribution                 #
diff --git a/src/Rules.LXarm.mk b/src/Rules.LXarm.mk
index 7622b6807a92a23c80581b34ac798fbae9d1b04a..918d1fc22466b689e4baa44008ae1620fd1df8cb 100644
--- a/src/Rules.LXarm.mk
+++ b/src/Rules.LXarm.mk
@@ -116,6 +116,10 @@ MNH_TOOLS=yes
 endif
 endif
 #
+## COMPRESS flag
+#
+#if MNH_COMPRESS exists => compile the COMPRESS library (for LFI files)
+MNH_COMPRESS=yes
 #
 #
 ##########################################################
diff --git a/src/Rules.LXcray.mk b/src/Rules.LXcray.mk
index 1fbd6578c079a9edf04324e5b4e2c00132417628..ae24c842045c6172802a7764007c727bcfa74336 100644
--- a/src/Rules.LXcray.mk
+++ b/src/Rules.LXcray.mk
@@ -109,6 +109,11 @@ GRIBAPI_CONF="FCFLAGS= -em -ef "
 #if MNH_TOOLS exists => compile the tools
 MNH_TOOLS = yes
 #
+## COMPRESS flag
+#
+#if MNH_COMPRESS exists => compile the COMPRESS library (for LFI files)
+MNH_COMPRESS=yes
+#
 ##########################################################
 #                                                        #
 # Source of MESONH PACKAGE  Distribution                 #
diff --git a/src/Rules.LXg95.mk b/src/Rules.LXg95.mk
index fa86c4daf1e6d4f721e6b44e86c15a39e26700af..cdd6184f0e84cc4d21a443f54e42f33be0af8218 100644
--- a/src/Rules.LXg95.mk
+++ b/src/Rules.LXg95.mk
@@ -81,6 +81,11 @@ CNAME_GRIBEX=g95
 #if MNH_TOOLS exists => compile the tools
 MNH_TOOLS = yes
 #
+## COMPRESS flag
+#
+#if MNH_COMPRESS exists => compile the COMPRESS library (for LFI files)
+MNH_COMPRESS=yes
+#
 ##########################################################
 #                                                        #
 # Source of MESONH PACKAGE  Distribution                 #
diff --git a/src/Rules.LXgfortran.mk b/src/Rules.LXgfortran.mk
index cdf8bc9382cbc68b09970eda488fbdfaa03a68c4..a606a2fc3db5adbcc6a56757e0a33dad98f501e4 100644
--- a/src/Rules.LXgfortran.mk
+++ b/src/Rules.LXgfortran.mk
@@ -110,6 +110,10 @@ MNH_TOOLS=yes
 endif
 endif
 #
+## COMPRESS flag
+#
+#if MNH_COMPRESS exists => compile the COMPRESS library (for LFI files)
+MNH_COMPRESS=yes
 #
 #
 ##########################################################
diff --git a/src/Rules.LXifort.mk b/src/Rules.LXifort.mk
index 3a3185d5ae309894882b27a785f16aedb906a4b4..60af5234d13a994d9353236cb5bbc13c6d1c0132 100644
--- a/src/Rules.LXifort.mk
+++ b/src/Rules.LXifort.mk
@@ -205,6 +205,11 @@ ifeq "$(MNH_INT)" "4"
 MNH_TOOLS=yes
 endif
 #
+## COMPRESS flag
+#
+#if MNH_COMPRESS exists => compile the COMPRESS library (for LFI files)
+MNH_COMPRESS=yes
+#
 ##########################################################
 #                                                        #
 # Source of MESONH PACKAGE  Distribution                 #
diff --git a/src/Rules.LXpathf95.mk b/src/Rules.LXpathf95.mk
index 014fcbaf4445afc7f81a69a5b50bdca85bca6cfd..1e0487f1fc9a8ab76f4b1d2eefcdc6a0659fba60 100644
--- a/src/Rules.LXpathf95.mk
+++ b/src/Rules.LXpathf95.mk
@@ -57,6 +57,11 @@ CNAME_GRIBEX=pathf95
 #if MNH_TOOLS exists => compile the tools
 MNH_TOOLS = yes
 #
+## COMPRESS flag
+#
+#if MNH_COMPRESS exists => compile the COMPRESS library (for LFI files)
+MNH_COMPRESS=yes
+#
 ##########################################################
 #                                                        #
 # Source of MESONH PACKAGE  Distribution                 #
diff --git a/src/Rules.LXpgi.mk b/src/Rules.LXpgi.mk
index 9b53a87c3ca2789c51a05c81b55de3ff391f4e00..7bae40f42bd475ff16b384f0b22aaa6a2a00490d 100644
--- a/src/Rules.LXpgi.mk
+++ b/src/Rules.LXpgi.mk
@@ -116,6 +116,11 @@ CNAME_GRIBEX=_pgf77
 #if MNH_TOOLS exists => compile the tools
 MNH_TOOLS = yes
 #
+## COMPRESS flag
+#
+#if MNH_COMPRESS exists => compile the COMPRESS library (for LFI files)
+MNH_COMPRESS=yes
+#
 ##########################################################
 #                                                        #
 # Source of MESONH PACKAGE  Distribution                 #
diff --git a/src/Rules.SX8.mk b/src/Rules.SX8.mk
index e5bb540f66d76050a6a8b064dbf354dbf02f4736..1246647cc25fd7a37574bb1bd87bab27afe04c91 100644
--- a/src/Rules.SX8.mk
+++ b/src/Rules.SX8.mk
@@ -103,6 +103,11 @@ CNAME_GRIBEX=sxmpif90
 #if MNH_TOOLS exists => compile the tools
 #MNH_TOOLS = no
 #
+## COMPRESS flag
+#
+#if MNH_COMPRESS exists => compile the COMPRESS library (for LFI files)
+#MNH_COMPRESS=no
+#
 ##########################################################
 #                                                        #
 # Source of MESONH PACKAGE  Distribution                 #