Skip to content

TFM93/fcompare

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FCompare

fcompare is a demo tool that accepts two JSON array files and prints out if they are equal.

Table of contents

How To Run

fcompare needs 2 file paths to run. To test this, one could:

go build fcompare.go
./fcompare filepath1.json filepath2.json

or just:

go run fcompare filepath1.json filepath2.json

How It Works

The program will open both files but not load them immediately to memory. Instead, 2 go routines are created, one per file. Each routine will stream the file contents in chunks (json objects in this case), generate a checksum for the streamed object and map the checksum into the memory. In the end, if the synced memory is empty the files are identical.

About

check if 2 json array files are identical

Resources

Stars

Watchers

Forks

Languages