Skip to content
Snippets Groups Projects
Commit 7d850bd7 authored by Alvin Noe Ladines's avatar Alvin Noe Ladines
Browse files

Added xz compression

parent dc59aff1
Branches
Tags
No related merge requests found
...@@ -16,6 +16,7 @@ import os ...@@ -16,6 +16,7 @@ import os
import logging import logging
import gzip import gzip
import bz2 import bz2
import lzma
from nomadcore.baseclasses import ParserInterface from nomadcore.baseclasses import ParserInterface
import nomadcore.baseclasses import nomadcore.baseclasses
...@@ -44,6 +45,8 @@ class VASPRunParser: ...@@ -44,6 +45,8 @@ class VASPRunParser:
open_file = gzip.open open_file = gzip.open
elif filepath.endswith('.bz2'): elif filepath.endswith('.bz2'):
open_file = bz2.open open_file = bz2.open
elif filepath.endswith('.xz'):
open_file = lzma.open
parser.parse(os.path.abspath(filepath), open_file(filepath, 'rt'), backend) parser.parse(os.path.abspath(filepath), open_file(filepath, 'rt'), backend)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment