@@ -127,6 +127,26 @@ async function scanArchiveFile(
127127 await exec . exec ( "tar" , [ "-xzf" , archivePath , "-C" , tempExtractDir ] , {
128128 silent : true ,
129129 } ) ;
130+ } else if ( fileName . endsWith ( ".tar.zst" ) ) {
131+ // Extract tar.zst files
132+ logger . debug ( `Extracting tar.zst file: ${ archivePath } ` ) ;
133+ await exec . exec (
134+ "tar" ,
135+ [ "--zstd" , "-xf" , archivePath , "-C" , tempExtractDir ] ,
136+ {
137+ silent : true ,
138+ } ,
139+ ) ;
140+ } else if ( fileName . endsWith ( ".zst" ) ) {
141+ // Extract .zst files (single file compression)
142+ logger . debug ( `Extracting zst file: ${ archivePath } ` ) ;
143+ const outputFile = path . join (
144+ tempExtractDir ,
145+ path . basename ( archivePath , ".zst" ) ,
146+ ) ;
147+ await exec . exec ( "zstd" , [ "-d" , archivePath , "-o" , outputFile ] , {
148+ silent : true ,
149+ } ) ;
130150 } else if ( fileName . endsWith ( ".gz" ) ) {
131151 // Extract .gz files (single file compression)
132152 logger . debug ( `Extracting gz file: ${ archivePath } ` ) ;
@@ -199,6 +219,8 @@ async function scanFile(
199219 fileName . endsWith ( ".zip" ) ||
200220 fileName . endsWith ( ".tar.gz" ) ||
201221 fileName . endsWith ( ".tgz" ) ||
222+ fileName . endsWith ( ".tar.zst" ) ||
223+ fileName . endsWith ( ".zst" ) ||
202224 fileName . endsWith ( ".gz" ) ;
203225
204226 if ( isArchive ) {
0 commit comments