Sample code for 30+ languages & platforms
Lua

Compute CRC32 of a File

Calculates the CRC32 of a file's contents and returns the 32-bit CRC as a hex string.

Chilkat Lua Downloads

Lua
local chilkat = require("chilkat")

local zipCrc = chilkat.ZipCrc.new()
-- Use a relative for absolute path to the file..
local crc = zipCrc:file_crc("qa_data/hamlet.xml")
local hexStr = zipCrc:to_hex(crc)
print(hexStr)