public static Memory sha1_file(Environment env, TraceInfo trace, String fileName, boolean rawOutput) {
        try {
            BufferedInputStream reader = new BufferedInputStream(new FileInputStream(fileName));
            try {
                MessageDigest md = sha1Digest.get();
                md.reset();

                int len;
                byte[] buff = new byte[1024];
                while ((len = reader.read(buff)) > 0) {
                    md.update(buff, 0, len);
                }

                if (rawOutput)
                    return new BinaryMemory(md.digest());
                else
                    return new StringMemory(DigestUtils.bytesToHex(md.digest()));
            } finally {
                reader.close();
            }
        } catch (FileNotFoundException e) {
            env.warning(trace, "sha1_file(): " + Messages.ERR_FILE_NOT_FOUND.fetch(fileName));
            return Memory.FALSE;
        } catch (IOException e) {
            env.warning(trace, "sha1_file(): " + e.getMessage());
            return Memory.FALSE;
        }
    }
Parses the cslashes bitmap returning an actual bitmap.

@param charset the bitmap string

@return the actual bitmap
exts/jphp-zend-ext/src/main/java/org/develnext/jphp/zend/ext/standard/StringFunctions.java