\r\n

51Degrees Device Detection .NET  4.4

Device detection services for 51Degrees Pipeline

FiftyOne.DeviceDetection.Examples.OnPremise.Performance.Utf8EvidencePreprocessor Class Reference

Detailed Description

Preprocesses evidence by converting string values to UTF-8 byte arrays to eliminate UTF-16 to UTF-8 conversion overhead during detection.

Static Public Member Functions

static List< Dictionary< string, object > >  ConvertToUtf8 (List< Dictionary< string, object >> evidenceList)
Converts a dictionary of evidence with string values to UTF-8 encoded strings. More...
static List< Dictionary< byte[], byte[]> >  ConvertToUtf8Bytes (List< Dictionary< string, object >> evidenceList)
Alternative approach that stores evidence as UTF-8 byte arrays. More...

Member Function Documentation

◆ ConvertToUtf8()

static List<Dictionary<string, object> > FiftyOne.DeviceDetection.Examples.OnPremise.Performance.Utf8EvidencePreprocessor.ConvertToUtf8 ( List< Dictionary< string, object >>   evidenceList )
static

Converts a dictionary of evidence with string values to UTF-8 encoded strings.

This is done to eliminate the UTF-16 to UTF-8 conversion that happens during the SWIG marshaling process.

◆ ConvertToUtf8Bytes()

static List<Dictionary<byte[], byte[]> > FiftyOne.DeviceDetection.Examples.OnPremise.Performance.Utf8EvidencePreprocessor.ConvertToUtf8Bytes ( List< Dictionary< string, object >>   evidenceList )
static

Alternative approach that stores evidence as UTF-8 byte arrays.

This would require API changes to accept byte[] evidence.